1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

traffic replay: allow --random-seed=0

Zero is a valid seed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2018-10-05 14:42:27 +13:00 committed by Douglas Bagnall
parent 8760168aa8
commit 4c46333499

View File

@ -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)