From 64da0b0671115e0a74b6e9be0c27dfcd87df8c27 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 2 Feb 2010 20:02:47 +0100 Subject: [PATCH] correctly get error numbre from error object. --- src/common/socks5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/socks5.py b/src/common/socks5.py index f3c1a5b5e..59d7e4b5a 100644 --- a/src/common/socks5.py +++ b/src/common/socks5.py @@ -865,7 +865,7 @@ class Socks5Listener(IdleObject): try: self._serv = socket.socket(*ai[:3]) except socket.error, e: - if e.errno == EAFNOSUPPORT: + if e.args[0] == EAFNOSUPPORT: self.ai = None continue raise