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 wrap: on
line diff
--- a/apps/generate-config-files.py	Tue Mar 10 09:20:10 2009 +0100
+++ b/apps/generate-config-files.py	Tue Mar 10 09:30:16 2009 +0100
@@ -65,14 +65,15 @@
                   help="be quiet")
 parser.add_option("-n", "--players", dest="n", type="int",
                   help="number of players")
-parser.add_option("-k", "--keysize", dest="keysize", type="int", default=1024,
+parser.add_option("-k", "--keysize", type="int",
                   help="Specify the key-size")
 parser.add_option("-t", "--threshold", dest="t", type="int",
                   help="threshold (it must hold that t < n/2)")
 parser.add_option("--skip-prss", action="store_true",
                   help="do not generate PRSS keys")
 
-parser.set_defaults(verbose=True, n=3, t=1, prefix='player', skip_prss=False)
+parser.set_defaults(verbose=True, n=3, t=1, prefix='player', skip_prss=False,
+                    keysize=1024)
 
 (options, args) = parser.parse_args()
 
@@ -80,8 +81,8 @@
     parser.error("must supply a hostname:port argument for each player")
 
 addresses = [arg.split(':', 1) for arg in args]
-configs = generate_configs(options.n, options.t, options.keysize, addresses, options.prefix,
-                           options.skip_prss)
+configs = generate_configs(options.n, options.t, options.keysize, addresses,
+                           options.prefix, options.skip_prss)
 
 for config in configs.itervalues():
     config.write()