[tahoe-lafs-trac-stream] [tahoe-lafs] #974: provide user-friendly error message if the CLI can't connect to the gateway
tahoe-lafs
trac at tahoe-lafs.org
Wed May 4 22:27:07 PDT 2011
#974: provide user-friendly error message if the CLI can't connect to the gateway
----------------------------+----------------------------------------------
Reporter: zooko | Owner: guyzmo
Type: defect | Status: new
Priority: major | Milestone: 1.9.0
Component: code- | Version: 1.6.0
frontend-cli | Keywords: usability easy error test-needed
Resolution: |
Launchpad Bug: |
----------------------------+----------------------------------------------
Changes (by zooko):
* keywords: usability easy error => usability easy error test-needed
* owner: davidsarah => guyzmo
* status: assigned => new
Comment:
Guyzmo: thank you for the patch!
The patch in attachment:ticket-974.patch needs a unit test to show that
the current code does the wrong thing in this case and the code after the
patch does the right thing.
See [http://tahoe-lafs.org/trac/tahoe-
lafs/browser/trunk/src/allmydata/test/test_cli.py?annotate=blame&rev=5023#L525
test_cli.CreateAlias.test_create] for an example of how to assert that the
code under test printed out an acceptable string and exited with the right
exit code.
See [http://tahoe-lafs.org/trac/tahoe-
lafs/browser/trunk/src/allmydata/test/test_cli.py?annotate=blame&rev=5023#L1289
test_mv_error_if_DELETE_fails] for an example of how to make the call to
{{{do_http()}}} (that the code under test makes) raise {{{socket.error}}}.
Hm, also {{{socket.error}}} may be too specific. Probably if the call to
{{{do_http()}}} raises ''any'' exception then {{{tahoe add-alias}}} ought
to report that exception in a nice way instead of a Python traceback? Or
at least any {{{EnvironmentError}}}, which indicates that there is a
problem from the operating system, such as a socket error.
Adding the tag {{{test-needed}}} to this ticket.
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/974#comment:9>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list