viff

changeset 1112:febb63e773e4

Better error message.
author Martin Geisler <mg@daimi.au.dk>
date Thu, 26 Feb 2009 21:01:21 +0100
parents ab726c059750
children c73d989810fb
files apps/multiply.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/apps/multiply.py	Fri Feb 20 10:20:34 2009 +0100
     1.2 +++ b/apps/multiply.py	Thu Feb 26 21:01:21 2009 +0100
     1.3 @@ -1,6 +1,6 @@
     1.4  #!/usr/bin/python
     1.5  
     1.6 -# Copyright 2008 VIFF Development Team.
     1.7 +# Copyright 2008, 2009 VIFF Development Team.
     1.8  #
     1.9  # This file is part of VIFF, the Virtual Ideal Functionality Framework.
    1.10  #
    1.11 @@ -24,10 +24,13 @@
    1.12  from viff.runtime import create_runtime, Runtime
    1.13  from viff.config import load_config
    1.14  
    1.15 -parser = OptionParser()
    1.16 +parser = OptionParser("%prog config input")
    1.17  Runtime.add_options(parser)
    1.18  (options, args) = parser.parse_args()
    1.19  
    1.20 +if len(args) != 2:
    1.21 +    parser.error("please supply a config file and an integer")
    1.22 +
    1.23  Zp = GF(1031)
    1.24  
    1.25  id, players = load_config(args[0])