tpy3: socket.error is deprecated - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 89240571d49e8374cb99bad34a2e7cc1bededcc9 DIR parent 1cbc794229d368e78eaa5157468ac59132b0fbab HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 25 Oct 2017 18:22:54 +0200 py3: socket.error is deprecated Diffstat: M lib/util.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) --- DIR diff --git a/lib/util.py b/lib/util.py t@@ -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: