Rev 5651: Stop swallowing details about the original error in file:///home/vila/src/bzr/bugs/788530-better-invalid-http-response/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu May 26 09:53:19 UTC 2011
At file:///home/vila/src/bzr/bugs/788530-better-invalid-http-response/
------------------------------------------------------------
revno: 5651
revision-id: v.ladeuil+lp at free.fr-20110526095318-any966zva61awypo
parent: pqm at pqm.ubuntu.com-20110524112316-6nv9mvjm7nai7znr
fixes bug(s): https://launchpad.net/bugs/788530
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 788530-better-invalid-http-response
timestamp: Thu 2011-05-26 11:53:18 +0200
message:
Stop swallowing details about the original error
-------------- next part --------------
=== modified file 'bzrlib/errors.py'
--- a/bzrlib/errors.py 2011-01-20 21:15:10 +0000
+++ b/bzrlib/errors.py 2011-05-26 09:53:18 +0000
@@ -1706,10 +1706,16 @@
class InvalidHttpResponse(TransportError):
- _fmt = "Invalid http response for %(path)s: %(msg)s"
+ _fmt = "Invalid http response for %(path)s: %(msg)s%(orig_error)s"
def __init__(self, path, msg, orig_error=None):
self.path = path
+ if orig_error is None:
+ orig_error = ''
+ else:
+ # This is reached for obscure and unusual errors so we want to
+ # preserve as much info as possible to ease debug.
+ orig_error = ': %r' % (orig_error,)
TransportError.__init__(self, msg, orig_error=orig_error)
More information about the bazaar-commits
mailing list