mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 23:02:25 +00:00
Include the number of remaining shares of the right version in NotEnoughSharesError messages.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
This commit is contained in:
parent
e76281744c
commit
7956e22d21
@ -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)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user