[MERGE] clean error msg on bzr+ssh timeouts (#115601)
Martin Pool
mbp at canonical.com
Wed Oct 24 09:36:54 BST 2007
Martin Pool has voted tweak.
Status is now: Conditionally approved
Comment:
It's great to have this fixed.
+class ConnectionErrorOnStartUp(TransportError):
+
+ _fmt = "Disconnected from server during negotiation: %(msg)s
%(orig_error)s"
+
+
You need a test in test_errors that this is formatted properly.
(I know this seems bureaucratic but it does catch some mistakes.)
I think users may find 'at startup' more obvious than 'during
negotiation', aside from it matching the exception class name.
+ # disconnected after some data received
+ raise errors.ConnectionReset("connection timeout")
Is this a timeout? It looks to me more like the connection was closed
while we were reading a response. A timeout would likely be an error
from
read_bytes -- but real tcp timeouts are high and so rarely observed.
- assert new_char != '', "end of file reading from server."
yay. are there any other assert calls in this file?
The tests look ok to me, maybe you can ask andrew to glance at them too.
Thanks.
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3C471ECC7A.40701%40internode.on.net%3E
More information about the bazaar
mailing list