Rev 3067: We don't require paramiko for bzr+ssh. in http://bzr.arbash-meinel.com/branches/bzr/jam-integration

John Arbash Meinel john at arbash-meinel.com
Mon Dec 3 16:40:39 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 3067
revision-id:john at arbash-meinel.com-20071203163911-vddzgry5m29blfbk
parent: pqm at pqm.ubuntu.com-20071203012007-1tfytfzp7piacl7q
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Mon 2007-12-03 10:39:11 -0600
message:
  We don't require paramiko for bzr+ssh.
  Don't pretend like we do.
modified:
  bzrlib/smart/medium.py         medium.py-20061103051856-rgu2huy59fkz902q-1
  bzrlib/transport/ssh.py        ssh.py-20060824042150-0s9787kng6zv1nwq-1
-------------- next part --------------
=== modified file 'bzrlib/smart/medium.py'
--- a/bzrlib/smart/medium.py	2007-11-19 13:44:25 +0000
+++ b/bzrlib/smart/medium.py	2007-12-03 16:39:11 +0000
@@ -37,12 +37,7 @@
     SmartServerRequestProtocolOne,
     SmartServerRequestProtocolTwo,
     )
-
-try:
-    from bzrlib.transport import ssh
-except errors.ParamikoNotPresent:
-    # no paramiko.  SmartSSHClientMedium will break.
-    pass
+from bzrlib.transport import ssh
 
 
 class SmartServerStreamMedium(object):

=== modified file 'bzrlib/transport/ssh.py'
--- a/bzrlib/transport/ssh.py	2007-11-15 21:07:53 +0000
+++ b/bzrlib/transport/ssh.py	2007-12-03 16:39:11 +0000
@@ -331,7 +331,10 @@
     register_ssh_vendor('paramiko', vendor)
     register_ssh_vendor('none', vendor)
     register_default_ssh_vendor(vendor)
+    _sftp_connection_errors = (EOFError, paramiko.SSHException)
     del vendor
+else:
+    _sftp_connection_errors = (EOFError,)
 
 
 class SubprocessVendor(SSHVendor):
@@ -350,7 +353,7 @@
                                                   subsystem='sftp')
             sock = self._connect(argv)
             return SFTPClient(sock)
-        except (EOFError, paramiko.SSHException), e:
+        except _sftp_connection_errors, e:
             self._raise_connection_error(host, port=port, orig_error=e)
         except (OSError, IOError), e:
             # If the machine is fast enough, ssh can actually exit



More information about the bazaar-commits mailing list