From: Daira Hopwood Date: Tue, 14 May 2013 16:53:51 +0000 (+0100) Subject: Include the number of remaining shares of the right version in NotEnoughSharesError... X-Git-Tag: allmydata-tahoe-1.10.1a1~243 X-Git-Url: https://git.rkrishnan.org/frontends/CLI.txt?a=commitdiff_plain;h=7956e22d2149b0fb7f3014d6f43d01fb520c1b81;p=tahoe-lafs%2Ftahoe-lafs.git Include the number of remaining shares of the right version in NotEnoughSharesError messages. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/mutable/retrieve.py b/src/allmydata/mutable/retrieve.py index fd97b37d..2be92163 100644 --- a/src/allmydata/mutable/retrieve.py +++ b/src/allmydata/mutable/retrieve.py @@ -969,15 +969,18 @@ class Retrieve: """ format = ("ran out of servers: " - "have %(have)d of %(total)d segments " - "found %(bad)d bad shares " + "have %(have)d of %(total)d segments; " + "found %(bad)d bad shares; " + "have %(remaining)d remaining shares of the right version; " "encoding %(k)d-of-%(n)d") args = {"have": self._current_segment, "total": self._num_segments, "need": self._last_segment, "k": self._required_shares, "n": self._total_shares, - "bad": len(self._bad_shares)} + "bad": len(self._bad_shares), + "remaining": len(self.remaining_sharemap), + } raise NotEnoughSharesError("%s, last failure: %s" % (format % args, str(self._last_failure)))