From: Brian Warner Date: Tue, 12 Aug 2008 04:23:06 +0000 (-0700) Subject: checker_results.problems: don't str the whole Failure, just extract the reason string X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/css/flags/?a=commitdiff_plain;h=79576cf75b90e2b13cb4f22402a683e3dd63a6d3;p=tahoe-lafs%2Ftahoe-lafs.git checker_results.problems: don't str the whole Failure, just extract the reason string --- diff --git a/src/allmydata/mutable/checker.py b/src/allmydata/mutable/checker.py index b25859be..7ea313eb 100644 --- a/src/allmydata/mutable/checker.py +++ b/src/allmydata/mutable/checker.py @@ -189,7 +189,11 @@ class MutableChecker: report.append("Corrupt Shares:") for (peerid, shnum, f) in sorted(self.bad_shares): 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) self.results.problems.append(p)