Rev 3069: (John Arbash Meinel) Simple cleanup around stale paramiko traps. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Dec 3 20:26:49 GMT 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3069
revision-id:pqm at pqm.ubuntu.com-20071203202639-842vhwu1asbujc95
parent: pqm at pqm.ubuntu.com-20071203194627-dyicsjrmtmkg5tfy
parent: john at arbash-meinel.com-20071203163911-vddzgry5m29blfbk
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-12-03 20:26:39 +0000
message:
  (John Arbash Meinel) Simple cleanup around stale paramiko traps.
modified:
  bzrlib/smart/medium.py         medium.py-20061103051856-rgu2huy59fkz902q-1
  bzrlib/transport/ssh.py        ssh.py-20060824042150-0s9787kng6zv1nwq-1
    ------------------------------------------------------------
    revno: 3066.2.1
    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
=== 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