correctly get error numbre from error object.

This commit is contained in:
Yann Leboulanger 2010-02-02 20:02:47 +01:00
parent 4fe50e9466
commit 64da0b0671
1 changed files with 1 additions and 1 deletions

View File

@ -865,7 +865,7 @@ class Socks5Listener(IdleObject):
try: try:
self._serv = socket.socket(*ai[:3]) self._serv = socket.socket(*ai[:3])
except socket.error, e: except socket.error, e:
if e.errno == EAFNOSUPPORT: if e.args[0] == EAFNOSUPPORT:
self.ai = None self.ai = None
continue continue
raise raise