From 265c816e4ed418aefe9d4d539438586ace25f657 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 5 Sep 2013 18:01:02 +0100 Subject: [PATCH] Wed Dec 28 05:50:18 GMT 2011 Brian Warner * mutable publish: fix not-enough-shares detection. Refs #1628. This should match the "fix-1628.darcs.2.patch" attachment on that ticket. --- src/allmydata/mutable/publish.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/allmydata/mutable/publish.py b/src/allmydata/mutable/publish.py index 392495c1..c611a6f9 100644 --- a/src/allmydata/mutable/publish.py +++ b/src/allmydata/mutable/publish.py @@ -622,10 +622,9 @@ class Publish: # Can we still successfully publish this file? # TODO: Keep track of outstanding queries before aborting the # process. - all_writers = [] - for shnum, writers in self.writers.iteritems(): - all_writers.extend(writers) - if len(all_writers) < self.required_shares or self.surprised: + all_shnums = filter(lambda sh: len(self.writers[sh]) > 0, + self.writers.iterkeys()) + if len(all_shnums) < self.required_shares or self.surprised: return self._failure() # Figure out what we need to do next. Each of these needs to -- 2.45.2