mutable/publish.py: copy the self.writers dict before iterating over it, since we remove elements from it during the iteration. refs #393

This commit is contained in:
david-sarah 2011-09-24 14:12:08 -07:00
parent f94eb86fc9
commit 1fa5c729b7

View 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):