Skip to content

Commit

Permalink
except Exception as e syntax in green.core
Browse files Browse the repository at this point in the history
We now depend on py2.6, so the new-style syntax is acceptable
  • Loading branch information
minrk committed May 18, 2012
1 parent a61edcd commit 7ab9b10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zmq/green/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def close(self, linger=None):
if not self._closed and getattr(self, '_state_event', None):
try:
self._state_event.stop()
except AttributeError, e:
except AttributeError as e:
# gevent<1.0 compat
self._state_event.cancel()
super(_Socket, self).close(linger)
Expand All @@ -81,7 +81,7 @@ def __state_changed(self, event=None, _evtype=None):
self.__readable.set()
return
events = self.getsockopt(zmq.EVENTS)
except ZMQError, exc:
except ZMQError as exc:
self.__writable.set_exception(exc)
self.__readable.set_exception(exc)
else:
Expand All @@ -108,7 +108,7 @@ def send(self, data, flags=0, copy=True, track=False):
try:
# attempt the actual call
return super(_Socket, self).send(data, flags, copy, track)
except zmq.ZMQError, e:
except zmq.ZMQError as e:
# if the raised ZMQError is not EAGAIN, reraise
if e.errno != zmq.EAGAIN:
raise
Expand All @@ -122,7 +122,7 @@ def recv(self, flags=0, copy=True, track=False):
while True:
try:
return super(_Socket, self).recv(flags, copy, track)
except zmq.ZMQError, e:
except zmq.ZMQError as e:
if e.errno != zmq.EAGAIN:
raise
self._wait_read()

0 comments on commit 7ab9b10

Please sign in to comment.