use the new CheckResult getters almost everywhere

The remaining get_data() calls are either in
web.check_results.json_check_results(), or functioning as repr()s in
various unit test failure cases.
This commit is contained in:
Brian Warner
2012-05-25 00:13:48 -07:00
parent 1883d393c6
commit 4867dca3f0
6 changed files with 81 additions and 96 deletions

View File

@ -196,7 +196,7 @@ class DeepCheckResults(DeepResultsBase):
self.objects_unrecoverable += 1
self.all_results[tuple(path)] = r
self.all_results_by_storage_index[r.get_storage_index()] = r
self.corrupt_shares.extend(r.get_data()["list-corrupt-shares"])
self.corrupt_shares.extend(r.get_corrupt_shares())
def get_counters(self):
return {"count-objects-checked": self.objects_checked,
@ -234,7 +234,7 @@ class DeepCheckAndRepairResults(DeepResultsBase):
self.objects_unhealthy += 1
if not pre_repair.is_recoverable():
self.objects_unrecoverable += 1
self.corrupt_shares.extend(pre_repair.get_data()["list-corrupt-shares"])
self.corrupt_shares.extend(pre_repair.get_corrupt_shares())
if r.get_repair_attempted():
self.repairs_attempted += 1
if r.get_repair_successful():
@ -249,7 +249,7 @@ class DeepCheckAndRepairResults(DeepResultsBase):
self.objects_unrecoverable_post_repair += 1
self.all_results[tuple(path)] = r
self.all_results_by_storage_index[r.get_storage_index()] = r
self.corrupt_shares_post_repair.extend(post_repair.get_data()["list-corrupt-shares"])
self.corrupt_shares_post_repair.extend(post_repair.get_corrupt_shares())
def get_counters(self):
return {"count-objects-checked": self.objects_checked,