]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
checker_results.problems: don't str the whole Failure, just extract the reason string
authorBrian Warner <warner@allmydata.com>
Tue, 12 Aug 2008 04:23:06 +0000 (21:23 -0700)
committerBrian Warner <warner@allmydata.com>
Tue, 12 Aug 2008 04:23:06 +0000 (21:23 -0700)
src/allmydata/mutable/checker.py

index b25859be968568f2721c34c3b98607c1eed52936..7ea313eb2ffa0b896df08d6c5781b4ef522218b5 100644 (file)
@@ -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)