[tahoe-lafs-trac-stream] [tahoe-lafs] #1758: tahoe check on LIT produces KeyError

tahoe-lafs trac at tahoe-lafs.org
Wed Jan 2 02:49:34 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:           |
-------------------------+-------------------------------------------------

Old description:

> If I "tahoe check" a path that is actually a DIR-IMM (an empty
> directory), or a LIT file, I get an exception:
>
> Traceback (most recent call last):
>   File "/usr/local/bin/tahoe", line 9, in <module>
>     load_entry_point('allmydata-tahoe==1.9.1', 'console_scripts',
> 'tahoe')()
>   File "/usr/local/lib/python2.7/site-
> packages/allmydata/scripts/runner.py", line 113, in run
>     rc = runner(sys.argv[1:], install_node_control=install_node_control)
>   File "/usr/local/lib/python2.7/site-
> packages/allmydata/scripts/runner.py", line 99, in runner
>     rc = cli.dispatch[command](so)
>   File "/usr/local/lib/python2.7/site-packages/allmydata/scripts/cli.py",
> line 589, in check
>     rc = tahoe_check.check(options)
>   File "/usr/local/lib/python2.7/site-
> packages/allmydata/scripts/tahoe_check.py", line 80, in check
>     stdout.write("Summary: %s\n" % quote_output(data["summary"],
> quotemarks=False))
> KeyError: 'summary'
>
> On the other hand, "tahoe deep-check" is fine for the directory, but
> gives an unhelpful error if given the path to a LIT file:
>
> ERROR: 400 Bad Request
> POST to file: bad t=stream-deep-check

New description:

 If I "tahoe check" a path that is actually a DIR-IMM (an empty directory),
 or a LIT file, I get an exception:

 Traceback (most recent call last):
   File "/usr/local/bin/tahoe", line 9, in <module>
     load_entry_point('allmydata-tahoe==1.9.1', 'console_scripts',
 'tahoe')()
   File "/usr/local/lib/python2.7/site-
 packages/allmydata/scripts/runner.py", line 113, in run
     rc = runner(sys.argv[1:], install_node_control=install_node_control)
   File "/usr/local/lib/python2.7/site-
 packages/allmydata/scripts/runner.py", line 99, in runner
     rc = cli.dispatch[command](so)
   File "/usr/local/lib/python2.7/site-packages/allmydata/scripts/cli.py",
 line 589, in check
     rc = tahoe_check.check(options)
   File "/usr/local/lib/python2.7/site-
 packages/allmydata/scripts/tahoe_check.py", line 80, in check
     stdout.write("Summary: %s\n" % quote_output(data["summary"],
 quotemarks=False))
 KeyError: 'summary'

 On the other hand, "tahoe deep-check" is fine for the directory, but gives
 an unhelpful error if given the path to a LIT file:

 ERROR: 400 Bad Request
 POST to file: bad t=stream-deep-check

--

Comment (by davidsarah):

 Note that it is only checking a LIT file/dir directly that fails, not
 deep-checking a non-literal directory that contains LIT files or dirs.
 (The latter is tested, for the case of a LIT file, in
 {{{test_cli.Check.test_deep_check}}}.)

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1758#comment:3>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list