electrum

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

commit d07fce0826b42ff426c0ba3d735658f402970fa6
parent beacf88420b3d572914ddf19395f97c6e2537daf
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 26 Mar 2019 16:52:11 +0100

windows DNS resolution: handle domain with only AAAA records

this is getting too complicated :/

Diffstat:
Melectrum/network.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/electrum/network.py b/electrum/network.py @@ -540,9 +540,10 @@ class Network(PrintError): answers = dns.resolver.query(host, dns.rdatatype.A) addrs += [str(answer) for answer in answers] except dns.exception.DNSException as e: - # dns failed for some reason, e.g. dns.resolver.NXDOMAIN - # this is normal. Simply report back failure: - raise socket.gaierror(11001, 'getaddrinfo failed') from e + # dns failed for some reason, e.g. dns.resolver.NXDOMAIN this is normal. + # Simply report back failure; except if we already have some results. + if not addrs: + raise socket.gaierror(11001, 'getaddrinfo failed') from e except BaseException as e: # Possibly internal error in dnspython :( see #4483 print_error(f'dnspython failed to resolve dns (A) with error: {e}')