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 wrap: on
line diff
--- a/apps/divide.py	Thu Nov 13 17:44:18 2008 +0100
+++ b/apps/divide.py	Thu Nov 13 17:50:11 2008 +0100
@@ -104,11 +104,12 @@
     def run(runtime):
         print "Connected."
 
-        print "My number: %d." % options.number
         # Players 1 and 2 are doing a sharing over the field Zp.
         # Our input is options.number (none for other players).
         if runtime.id == 3:
-            options.number = None
+            print "I have no number"
+        else:
+            print "My number: %d." % options.number
         (x, y) = runtime.shamir_share([1, 2], Zp, options.number)
 
         # Do the secret computation.