viff

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 diff
     1.1 --- a/viff/runtime.py	Wed Apr 15 11:04:45 2009 +0200
     1.2 +++ b/viff/runtime.py	Wed Apr 15 11:30:07 2009 +0200
     1.3 @@ -654,12 +654,8 @@
     1.4              return share
     1.5  
     1.6      def _expect_share(self, peer_id, field):
     1.7 -
     1.8 -        def unpack_share(value_string):
     1.9 -            return field(long(value_string, 16))
    1.10 -
    1.11          share = Share(self, field)
    1.12 -        share.addCallback(unpack_share)
    1.13 +        share.addCallback(lambda value: field(long(value, 16)))
    1.14          self._expect_data(peer_id, SHARE, share)
    1.15          return share
    1.16