Corrected exception handling. We really should bump to Python 2.6. Fixes #5778
This commit is contained in:
parent
2017945e77
commit
62710e906a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue