viff

changeset 1022:3e149ed5f49b

Fixed crash...
author Martin Geisler <mg@daimi.au.dk>
date Thu, 13 Nov 2008 17:50:11 +0100
parents b0f0b8e8eff1
children 18b700913f57
files apps/divide.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/apps/divide.py	Thu Nov 13 17:44:18 2008 +0100
     1.2 +++ b/apps/divide.py	Thu Nov 13 17:50:11 2008 +0100
     1.3 @@ -104,11 +104,12 @@
     1.4      def run(runtime):
     1.5          print "Connected."
     1.6  
     1.7 -        print "My number: %d." % options.number
     1.8          # Players 1 and 2 are doing a sharing over the field Zp.
     1.9          # Our input is options.number (none for other players).
    1.10          if runtime.id == 3:
    1.11 -            options.number = None
    1.12 +            print "I have no number"
    1.13 +        else:
    1.14 +            print "My number: %d." % options.number
    1.15          (x, y) = runtime.shamir_share([1, 2], Zp, options.number)
    1.16  
    1.17          # Do the secret computation.