[merge] handle a SSHException

Robey Pointer robey at lag.net
Wed Jul 26 19:28:21 BST 2006


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





More information about the bazaar mailing list