Skip to content

Commit ec32daf

Browse files
author
Dan
committed
Better exception handling. Cleanups
1 parent 6646005 commit ec32daf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pssh/pssh_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,9 @@ def get_output(self, cmd, output):
603603
exc = sys.exc_info()
604604
try:
605605
host = ex.args[1]
606-
except IndexError, ex:
606+
except IndexError, _ex:
607607
logger.error("Got exception with no host argument - "
608-
"cannot update output data with %s", ex)
608+
"cannot update output data with %s", _ex)
609609
raise exc[1], None, exc[2]
610610
self._update_host_output(output, host, None, None, None, None, None, cmd,
611611
exception=ex)

pssh/ssh_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def _connect_tunnel(self):
146146
except channel_exception, ex:
147147
error_type = ex.args[1] if len(ex.args) > 1 else ex.args[0]
148148
raise ConnectionErrorException("Error connecting to host '%s:%s' - %s",
149-
self.host, self.port,
150-
str(error_type))
149+
self.host, self.port,
150+
str(error_type))
151151

152152
def _connect(self, client, host, port, sock=None, retries=1):
153153
"""Connect to host

0 commit comments

Comments
 (0)