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
1 changed files with 2 additions and 2 deletions

View File

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