[tahoe-lafs-trac-stream] [tahoe-lafs] #1758: tahoe check on LIT produces KeyError
tahoe-lafs
trac at tahoe-lafs.org
Wed Jan 2 03:18:27 UTC 2013
#1758: tahoe check on LIT produces KeyError
-------------------------+-------------------------------------------------
Reporter: | Owner: davidsarah
kmarkley86 | Status: new
Type: defect | Milestone: 1.10.0
Priority: normal | Version: 1.9.1
Component: code | Keywords: check deep-check lit immutable
Resolution: | error
Launchpad Bug: |
-------------------------+-------------------------------------------------
Comment (by davidsarah):
In [source:git/src/allmydata/scripts/tahoe_check.py],
{{{DeepCheckOutput.lineReceived}}} does this:
{{{
summary = cr.get("summary", "Healthy (LIT)")
}}}
whereas in the {{{check}}} function, {{{data["summary"]}}} is used without
any fallback for a missing field (and it would also fail a little further
on for other fields such as {{{cr["count-shares-good"]}}}).
There are two ways to fix the bug:
a) include {{{"summary"}}}, {{{"count-shares-*"}}}, {{{"list-corrupt-
shares"}}} fields in the output even for LIT files/dirs;
b) make '{{{tahoe check}}}' tolerate lack of these fields.
Arguably, {{{"summary"}}} makes sense for LIT files and the other fields
do not, but that doesn't really help a lot in choosing between a) and b).
Any preference? I have a patch for b) but it seems slightly ugly to do it
that way.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1758#comment:4>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list