Update interface.py

Fix timeout problem under Python 2.7.1 where a socket.error 60 is thrown instead of socket.timeout exception.
This commit is contained in:
dmcdad 2014-01-15 08:49:26 -06:00
parent e7b2b17930
commit 292ab39553
1 changed files with 3 additions and 1 deletions

View File

@ -427,7 +427,9 @@ class Interface(threading.Thread):
except ssl.SSLError:
timeout = True
except socket.error, err:
if err.errno in [11, 10035]:
if err.errno == 60:
timeout = True
elif err.errno in [11, 10035]:
print_error("socket errno", err.errno)
time.sleep(0.1)
continue