Use except x as y instead of except x, y

According to https://docs.python.org/3/howto/pyporting.html the
syntax changed in Python 3.x. The new syntax is usable with
Python >= 2.6 and should be preferred to be compatible with Python3.

Enabled hacking check H231.

Change-Id: I4c20a04bc7732efc2d4bbcbc3d285107b244e5fa
This commit is contained in:
Christian Berendt
2014-05-29 23:48:56 +02:00
parent 68a2b164b9
commit ddefc4d3fa
3 changed files with 3 additions and 2 deletions

View File

@@ -188,7 +188,7 @@ def ssh_connect(ip, username, connect_kwargs={}, timeout=60):
try:
client = SSHClient(ip, username, **connect_kwargs)
break
except socket.error, e:
except socket.error as e:
print "While testing ssh access:", e
time.sleep(5)