paramiko readv() should raise an exception

John Arbash Meinel john at arbash-meinel.com
Fri Sep 22 23:33:41 BST 2006


If you make an invalid readv request, paramiko.readv() will get a
short-read, and then have an 'assert' fail. This really should be turned
into a real exception, so that we can catch that exception and turn it
into another exception.

This has a few implications. Like if the connection goes down while we
are reading, we'll get an 'assert' failure, rather than being able to
detect 'Disconnected', and either Reconnect, or at least let the user
know what really happened.

We have similar issues with getting random EOFErrors when the connection
dies in the middle of reading. Is it possible for paramiko to detect
*why* it got EOF. (Can it tell the connection went down, rather than
only being able to determine that we reached the end of the content?)

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060922/7be22a59/attachment.pgp 


More information about the bazaar mailing list