summaryrefslogtreecommitdiff
path: root/gear/__init__.py
diff options
context:
space:
mode:
authorChristian Berendt <berendt@b1-systems.de>2014-05-30 00:10:47 +0200
committerChristian Berendt <berendt@b1-systems.de>2014-05-30 00:12:00 +0200
commitb5f1db6cd6ef1d5128e16864ce8381459dc1021d (patch)
tree113623071b0aee2556f64f26cda699d94b40c615 /gear/__init__.py
parentcb510440ffc17f57cd48ebc7dbbad30144e4b725 (diff)
downloadgear-b5f1db6cd6ef1d5128e16864ce8381459dc1021d.tar.gz
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: Ibe19ac61334d8708e3b8240e714ff98471b58111
Diffstat (limited to 'gear/__init__.py')
-rw-r--r--gear/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gear/__init__.py b/gear/__init__.py
index ea732cc..af033b1 100644
--- a/gear/__init__.py
+++ b/gear/__init__.py
@@ -760,7 +760,7 @@ class BaseClientServer(object):
self.connections_condition.release()
try:
self._pollLoop()
- except socket.error, e:
+ except socket.error as e:
if e.errno == errno.ECONNRESET:
self.log.debug("Connection reset by peer")
# This will get logged later at info level as
@@ -2503,7 +2503,7 @@ class Server(BaseClientServer):
else:
request.connection.sendRaw(b'ERR UNKNOWN_ACL_VERB\n')
return
- except ACLError, e:
+ except ACLError as e:
self.log.info("Error in grant command: %s" % (e.message,))
request.connection.sendRaw(b'ERR UNABLE %s\n' % (e.message,))
return
@@ -2537,7 +2537,7 @@ class Server(BaseClientServer):
else:
request.connection.sendRaw(b'ERR UNKNOWN_ACL_VERB\n')
return
- except ACLError, e:
+ except ACLError as e:
self.log.info("Error in revoke command: %s" % (e.message,))
request.connection.sendRaw(b'ERR UNABLE %s\n' % (e.message,))
return
@@ -2567,7 +2567,7 @@ class Server(BaseClientServer):
else:
request.connection.sendRaw(b'ERR UNKNOWN_ACL_VERB\n')
return
- except ACLError, e:
+ except ACLError as e:
self.log.info("Error in self-revoke command: %s" % (e.message,))
request.connection.sendRaw(b'ERR UNABLE %s\n' % (e.message,))
return