From 79576cf75b90e2b13cb4f22402a683e3dd63a6d3 Mon Sep 17 00:00:00 2001 From: Brian Warner <warner@allmydata.com> Date: Mon, 11 Aug 2008 21:23:06 -0700 Subject: [PATCH] checker_results.problems: don't str the whole Failure, just extract the reason string --- src/allmydata/mutable/checker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.45.2