From 466bb46abe93f394fc18f78d0aee787e1036e734 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Fri, 30 Mar 2007 16:55:04 -0700
Subject: [PATCH] handle foolscap's annoying tendency to turn everything into a
 sets.Set, which are not interoperable with 2.4's builtin 'set' type

---
 src/allmydata/upload.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/allmydata/upload.py b/src/allmydata/upload.py
index 7d9a28b0..e77cec5e 100644
--- a/src/allmydata/upload.py
+++ b/src/allmydata/upload.py
@@ -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
-- 
2.45.2