]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
mutable/publish.py: copy the self.writers dict before iterating over it, since we...
authordavid-sarah <david-sarah@jacaranda.org>
Sat, 24 Sep 2011 21:12:08 +0000 (14:12 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Sat, 24 Sep 2011 21:12:08 +0000 (14:12 -0700)
src/allmydata/mutable/publish.py

index a20ab15e1c28e650b90959fa80592fc8f0680fd3..0eceedb10cc01188ebd0c52147855d8e4c667ef3 100644 (file)
@@ -861,10 +861,7 @@ class Publish:
         ds = []
         verification_key = self._pubkey.serialize()
 
-
-        # TODO: Bad, since we remove from this same dict. We need to
-        # make a copy, or just use a non-iterated value.
-        for (shnum, writer) in self.writers.iteritems():
+        for (shnum, writer) in self.writers.copy().iteritems():
             writer.put_verification_key(verification_key)
             self.num_outstanding += 1
             def _no_longer_outstanding(res):