Browse Source

py3: socket.error is deprecated

seed_v14
ThomasV 7 years ago
parent
commit
89240571d4
  1. 16
      lib/util.py

16
lib/util.py

@ -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:

Loading…
Cancel
Save