[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
Sun Apr 1 03:40:24 UTC 2012


#974: provide user-friendly error message if the CLI can't connect to the gateway
--------------------------+------------------------------------------------
     Reporter:  zooko     |      Owner:  amiller
         Type:  defect    |     Status:  new
     Priority:  major     |  Milestone:  1.10.0
    Component:  code-     |    Version:  1.6.0
  frontend-cli            |   Keywords:  usability easy error review-needed
   Resolution:            |
Launchpad Bug:            |
--------------------------+------------------------------------------------
Changes (by davidsarah):

 * milestone:  1.11.0 => 1.10.0


Comment:

 Looks good, just a couple of style issues:

 * Write {{{BadResponse}}} as a top-level class like this:
 {{{
 class BadResponse(object):
     def __init__(self, url, err):
         self.status = -1
         self.reason = "Error trying to connect to %s: %s" % (url, err)
     def read(self, _):
         return ""
 }}}

 * Use
 [https://twistedmatrix.com/documents/10.1.0/api/twisted.trial.unittest.TestCase.html#patch
 self.patch] to patch {{{httplib.HTTPConnection.endheaders}}}.

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


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