From fd392d6b2090d227937add287a2ad0f8eb5cba59 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 5 Nov 2012 17:47:33 -0800 Subject: [PATCH] One more patch from @clarete's work --- paramiko/transport.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paramiko/transport.py b/paramiko/transport.py index 04680a9..c801031 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -44,7 +44,8 @@ from paramiko.primes import ModulusPack from paramiko.rsakey import RSAKey from paramiko.server import ServerInterface from paramiko.sftp_client import SFTPClient -from paramiko.ssh_exception import SSHException, BadAuthenticationType, ChannelException +from paramiko.ssh_exception import (SSHException, BadAuthenticationType, + ChannelException, ProxyCommandFailure) from paramiko.util import retry_on_signal from Crypto import Random @@ -1674,6 +1675,8 @@ class Transport (threading.Thread): timeout = 2 try: buf = self.packetizer.readline(timeout) + except ProxyCommandFailure: + raise except Exception, x: raise SSHException('Error reading SSH protocol banner' + str(x)) if buf[:4] == 'SSH-':