forked from TrueCloudLab/s3-tests
realistic.names shouldn't return a 0-length filename
This commit is contained in:
parent
3303b0f33b
commit
e4effe5479
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ def names(mean, stddev, charset=None, seed=None):
|
||||||
while True:
|
while True:
|
||||||
while True:
|
while True:
|
||||||
length = int(rand.normalvariate(mean, stddev))
|
length = int(rand.normalvariate(mean, stddev))
|
||||||
if length >= 0:
|
if length > 0:
|
||||||
break
|
break
|
||||||
name = ''.join(rand.choice(charset) for _ in xrange(length))
|
name = ''.join(rand.choice(charset) for _ in xrange(length))
|
||||||
yield name
|
yield name
|
||||||
|
|
Loading…
Reference in a new issue