changeset 1168:421a199020e9

Simplify _expect_share slightly.
author Martin Geisler <mg@cs.au.dk>
date Wed, 15 Apr 2009 11:30:07 +0200
parents b8c7b2447a2f
children 05bcb213270c 8d439efb4a90
files viff/runtime.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Wed Apr 15 11:04:45 2009 +0200
+++ b/viff/runtime.py	Wed Apr 15 11:30:07 2009 +0200
@@ -654,12 +654,8 @@
             return share
 
     def _expect_share(self, peer_id, field):
-
-        def unpack_share(value_string):
-            return field(long(value_string, 16))
-
         share = Share(self, field)
-        share.addCallback(unpack_share)
+        share.addCallback(lambda value: field(long(value, 16)))
         self._expect_data(peer_id, SHARE, share)
         return share