Corrected exception handling. We really should bump to Python 2.6. Fixes #5778

This commit is contained in:
Alexander Cherniuk 2010-06-09 23:13:17 +03:00
parent 2017945e77
commit 62710e906a

View file

@ -351,8 +351,8 @@ class NonBlockingTCP(NonBlockingTransport, IdleObject):
try: try:
self._sock.setblocking(False) self._sock.setblocking(False)
self._sock.connect((self.server, self.port)) self._sock.connect((self.server, self.port))
except Exception, (errnum, errstr): except Exception, exc:
pass errnum, errstr = exc.args
if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK): if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK):
# connecting in progress # connecting in progress