From 97ea4679a7c920eaa0c95ad1f9d94bcd23451f12 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 10 Sep 2018 01:08:28 +0200 Subject: [PATCH] network: fix monkey-patching in set_proxy --- electrum/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/network.py b/electrum/network.py index 440d41cad..24ba11820 100644 --- a/electrum/network.py +++ b/electrum/network.py @@ -426,7 +426,7 @@ class Network(PrintError): def set_proxy(self, proxy: Optional[dict]): self.proxy = proxy # Store these somewhere so we can un-monkey-patch - if not hasattr(socket, "_socketobject"): + if not hasattr(socket, "_getaddrinfo"): socket._getaddrinfo = socket.getaddrinfo if proxy: self.print_error('setting proxy', proxy)