From eacea1edd8f4384a7eb4c09c8a1e8115256989dd Mon Sep 17 00:00:00 2001 From: Dan <22e889d8@opayq.com> Date: Wed, 31 Aug 2016 15:21:19 +0100 Subject: [PATCH] Cleanup --- pssh/ssh_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pssh/ssh_client.py b/pssh/ssh_client.py index 80c66082..28f307d3 100644 --- a/pssh/ssh_client.py +++ b/pssh/ssh_client.py @@ -21,7 +21,7 @@ import sys from gevent import sleep import paramiko -from paramiko.ssh_exception import ChannelException as channel_exception +from paramiko.ssh_exception import ChannelException import os from socket import gaierror as sock_gaierror, error as sock_error from .exceptions import UnknownHostException, AuthenticationException, \ @@ -143,7 +143,7 @@ def _connect_tunnel(self): ('127.0.0.1', 0)) sleep(0) return self._connect(self.client, self.host, self.port, sock=proxy_channel) - except channel_exception, ex: + except ChannelException, ex: error_type = ex.args[1] if len(ex.args) > 1 else ex.args[0] raise ConnectionErrorException("Error connecting to host '%s:%s' - %s", self.host, self.port,