checker_results.problems: don't str the whole Failure, just extract the reason string
This commit is contained in:
parent
d106e411af
commit
79576cf75b
|
@ -189,7 +189,11 @@ class MutableChecker:
|
||||||
report.append("Corrupt Shares:")
|
report.append("Corrupt Shares:")
|
||||||
for (peerid, shnum, f) in sorted(self.bad_shares):
|
for (peerid, shnum, f) in sorted(self.bad_shares):
|
||||||
s = "%s-sh%d" % (idlib.shortnodeid_b2a(peerid), shnum)
|
s = "%s-sh%d" % (idlib.shortnodeid_b2a(peerid), shnum)
|
||||||
report.append(" %s: %s" % (s, f))
|
if f.check(CorruptShareError):
|
||||||
|
ft = f.value.reason
|
||||||
|
else:
|
||||||
|
ft = str(f)
|
||||||
|
report.append(" %s: %s" % (s, ft))
|
||||||
p = (peerid, self._storage_index, shnum, f)
|
p = (peerid, self._storage_index, shnum, f)
|
||||||
self.results.problems.append(p)
|
self.results.problems.append(p)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue