[merge] handle a SSHException
John Arbash Meinel
john at arbash-meinel.com
Wed Jul 26 20:05:46 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robey Pointer wrote:
>
> On 25 Jul 2006, at 3:21, 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.
>
> +1
>
>
>> === modified file bzrlib/transport/sftp.py
>> --- bzrlib/transport/sftp.py
>> +++ bzrlib/transport/sftp.py
>> @@ -63,7 +63,7 @@
>> from paramiko.sftp_attr import SFTPAttributes
>> from paramiko.sftp_file import SFTPFile
>> from paramiko.sftp_client import SFTPClient
>> -
>> + from paramiko.ssh_exception import SSHException
>
> Also, I just noticed this. These could [should?] actually just be
> imported from paramiko directly:
>
> from paramiko import (SFTPAttributes, SFTPClient, ...)
>
> using whichever multi-line import format was agreed on.
>
>
> robey
Actually, I recently got a traceback from paramiko itself saying that
SSHException was not defined.
So you probably need to double check that you are internally importing
everything correctly.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEx70KJdeBCYSNAAMRAg6iAJ9olq3YXtTR3b0sLik8knX2vdqQ0QCfcUh/
5wCmQyKxlKaXeqxNH2/nxpc=
=M0EC
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list