py3: socket.error is deprecated
This commit is contained in:
parent
1cbc794229
commit
89240571d4
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…
Reference in New Issue