py3: socket.error is deprecated

This commit is contained in:
ThomasV 2017-10-25 18:22:54 +02:00
parent 1cbc794229
commit 89240571d4
1 changed files with 4 additions and 12 deletions

View File

@ -676,18 +676,10 @@ class SocketPipe:
print_error("SSLError:", e)
time.sleep(0.1)
continue
except socket.error as e:
if e[0] in (errno.EWOULDBLOCK,errno.EAGAIN):
print_error("EAGAIN: retrying")
time.sleep(0.1)
continue
elif e[0] in ['timed out', 'The write operation timed out']:
print_error("socket timeout, retry")
time.sleep(0.1)
continue
else:
traceback.print_exc(file=sys.stdout)
raise e
except OSError as e:
print_error("OSError", e)
time.sleep(0.1)
continue
class QueuePipe: