]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
handle foolscap's annoying tendency to turn everything into a sets.Set, which are...
authorBrian Warner <warner@allmydata.com>
Fri, 30 Mar 2007 23:55:04 +0000 (16:55 -0700)
committerBrian Warner <warner@allmydata.com>
Fri, 30 Mar 2007 23:55:04 +0000 (16:55 -0700)
src/allmydata/upload.py

index 7d9a28b0b1370c3172995a8dce989a1884049d83..e77cec5ef13dc122c54341ad0612c14bcfb799ab 100644 (file)
@@ -198,6 +198,10 @@ class FileUploader:
         @type alreadygot: a set of sharenums
         @type allocated: a set of sharenums
         """
+        # TODO: some future version of Foolscap might not convert inbound
+        # sets into sets.Set on us, even when we're using 2.4
+        alreadygot = set(alreadygot)
+        allocated = set(allocated)
         log.msg("%s._got_response(%s, %s, %s): self.unallocated_sharenums: %s, unhandled: %s" % (self, (alreadygot, allocated), peer, shares_we_requested, self.unallocated_sharenums, shares_we_requested - alreadygot - allocated))
         self.unallocated_sharenums -= alreadygot
         self.unallocated_sharenums -= allocated