http://hg.viff.dk/viff/rev/febb63e773e4
changeset: 1112:febb63e773e4
user:      Martin Geisler <[email protected]>
date:      Thu Feb 26 21:01:21 2009 +0100
summary:   Better error message.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
apps/multiply.py |    7 +++++--

diffs (26 lines):

diff -r ab726c059750 -r febb63e773e4 apps/multiply.py
--- a/apps/multiply.py  Fri Feb 20 10:20:34 2009 +0100
+++ b/apps/multiply.py  Thu Feb 26 21:01:21 2009 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-# Copyright 2008 VIFF Development Team.
+# Copyright 2008, 2009 VIFF Development Team.
 #
 # This file is part of VIFF, the Virtual Ideal Functionality Framework.
 #
@@ -24,10 +24,13 @@
 from viff.runtime import create_runtime, Runtime
 from viff.config import load_config
 
-parser = OptionParser()
+parser = OptionParser("%prog config input")
 Runtime.add_options(parser)
 (options, args) = parser.parse_args()
 
+if len(args) != 2:
+    parser.error("please supply a config file and an integer")
+
 Zp = GF(1031)
 
 id, players = load_config(args[0])
_______________________________________________
viff-commits mailing list
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-commits-viff.dk

Reply via email to