viff

changeset 1124:6b696d2d2758

Small cleanups. Moved --keysize default down to other defaults, removed unneeded dest keyword argument for --keysize and wrapped a long line.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 10 Mar 2009 09:30:16 +0100
parents 3d739e0e2e17
children 063dbf0f3274
files apps/generate-config-files.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/apps/generate-config-files.py	Tue Mar 10 09:20:10 2009 +0100
     1.2 +++ b/apps/generate-config-files.py	Tue Mar 10 09:30:16 2009 +0100
     1.3 @@ -65,14 +65,15 @@
     1.4                    help="be quiet")
     1.5  parser.add_option("-n", "--players", dest="n", type="int",
     1.6                    help="number of players")
     1.7 -parser.add_option("-k", "--keysize", dest="keysize", type="int", default=1024,
     1.8 +parser.add_option("-k", "--keysize", type="int",
     1.9                    help="Specify the key-size")
    1.10  parser.add_option("-t", "--threshold", dest="t", type="int",
    1.11                    help="threshold (it must hold that t < n/2)")
    1.12  parser.add_option("--skip-prss", action="store_true",
    1.13                    help="do not generate PRSS keys")
    1.14  
    1.15 -parser.set_defaults(verbose=True, n=3, t=1, prefix='player', skip_prss=False)
    1.16 +parser.set_defaults(verbose=True, n=3, t=1, prefix='player', skip_prss=False,
    1.17 +                    keysize=1024)
    1.18  
    1.19  (options, args) = parser.parse_args()
    1.20  
    1.21 @@ -80,8 +81,8 @@
    1.22      parser.error("must supply a hostname:port argument for each player")
    1.23  
    1.24  addresses = [arg.split(':', 1) for arg in args]
    1.25 -configs = generate_configs(options.n, options.t, options.keysize, addresses, options.prefix,
    1.26 -                           options.skip_prss)
    1.27 +configs = generate_configs(options.n, options.t, options.keysize, addresses,
    1.28 +                           options.prefix, options.skip_prss)
    1.29  
    1.30  for config in configs.itervalues():
    1.31      config.write()