From 4c463334997d184f6186d26258bdde84d216e136 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 5 Oct 2018 14:42:27 +1300 Subject: [PATCH] traffic replay: allow --random-seed=0 Zero is a valid seed. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- script/traffic_replay | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/traffic_replay b/script/traffic_replay index 124136e9495..5adeec101de 100755 --- a/script/traffic_replay +++ b/script/traffic_replay @@ -71,7 +71,7 @@ def main(): parser.add_option('-c', '--clean-up', action="store_true", help='Clean up the generated groups and user accounts') - parser.add_option('--random-seed', type='int', default=0, + parser.add_option('--random-seed', type='int', default=None, help='Use to keep randomness consistent across multiple runs') model_group = optparse.OptionGroup(parser, 'Traffic Model Options', @@ -173,7 +173,7 @@ def main(): " for the users created as part of this test")) sys.exit(1) - if opts.random_seed: + if opts.random_seed is not None: random.seed(opts.random_seed) creds = credopts.get_credentials(lp)