electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 89240571d49e8374cb99bad34a2e7cc1bededcc9
parent 1cbc794229d368e78eaa5157468ac59132b0fbab
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 25 Oct 2017 18:22:54 +0200

py3: socket.error is deprecated

Diffstat:
Mlib/util.py | 16++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/lib/util.py b/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: