From e4effe5479e550956c38f9526d30a797af9ecf41 Mon Sep 17 00:00:00 2001 From: Wesley Spikes Date: Mon, 11 Jul 2011 14:17:06 -0700 Subject: [PATCH] realistic.names shouldn't return a 0-length filename --- s3tests/realistic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3tests/realistic.py b/s3tests/realistic.py index e5d234b..0ead55b 100644 --- a/s3tests/realistic.py +++ b/s3tests/realistic.py @@ -123,7 +123,7 @@ def names(mean, stddev, charset=None, seed=None): while True: while True: length = int(rand.normalvariate(mean, stddev)) - if length >= 0: + if length > 0: break name = ''.join(rand.choice(charset) for _ in xrange(length)) yield name