[merge] handle a SSHException
John Arbash Meinel
john at arbash-meinel.com
Wed Jul 26 21:49:38 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stefan (metze) Metzmacher wrote:
> Hi *,
>
> I think it would be nice to catch an SSHException,
> while trying to connect to a remote sftp server
> and report an error instead of a python backtrace.
>
> metze
I like the patch, but I think I've seen more of 'EOFError' than
SSHException. It might be because I'm running paramiko 1.5.2 instead of
1.6.1.
Actually, in my testing with 1.5.2 I get EOFError, and with paramiko
1.6.1-dev (revno 371) I get the exception:
File "build/bdist.linux-i686/egg/paramiko/sftp_client.py", line 86, in
__init__
NameError: global name 'SSHException' is not defined
Which is just a bug in paramiko, but either way, it won't be fixed by
your patch.
So I'd like to modify the patch to check for at least EOFError and
SSHException. I don't think we want to catch NameError.
Otherwise +1 on the patch.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEx9ViJdeBCYSNAAMRAgKwAJ9HxEu4aZ5eRiAaQcid4yn4tXty9gCfRIas
LBxvTYC03kU/FSe1OsddIbU=
=Mb3q
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list