Commit 82aeeb02 authored by Yann Leboulanger's avatar Yann Leboulanger

prevent traceback

parent 7f49b6b7
......@@ -357,7 +357,11 @@ class NonBlockingTCP(NonBlockingTransport, IdleObject):
self._sock.setblocking(False)
self._sock.connect((self.server, self.port))
except Exception, exc:
errnum, errstr = exc.args
if type(exc.args) == tuple:
errnum, errstr = exc.args
else:
errnum = 'unknown'
errstr = exc.args
if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK):
# connecting in progress
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment