mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 01:35:20 +00:00
windows DNS resolution: handle domain with only AAAA records
this is getting too complicated :/
This commit is contained in:
parent
beacf88420
commit
d07fce0826
1 changed files with 4 additions and 3 deletions
|
@ -540,9 +540,10 @@ class Network(PrintError):
|
||||||
answers = dns.resolver.query(host, dns.rdatatype.A)
|
answers = dns.resolver.query(host, dns.rdatatype.A)
|
||||||
addrs += [str(answer) for answer in answers]
|
addrs += [str(answer) for answer in answers]
|
||||||
except dns.exception.DNSException as e:
|
except dns.exception.DNSException as e:
|
||||||
# dns failed for some reason, e.g. dns.resolver.NXDOMAIN
|
# dns failed for some reason, e.g. dns.resolver.NXDOMAIN this is normal.
|
||||||
# this is normal. Simply report back failure:
|
# Simply report back failure; except if we already have some results.
|
||||||
raise socket.gaierror(11001, 'getaddrinfo failed') from e
|
if not addrs:
|
||||||
|
raise socket.gaierror(11001, 'getaddrinfo failed') from e
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
# Possibly internal error in dnspython :( see #4483
|
# Possibly internal error in dnspython :( see #4483
|
||||||
print_error(f'dnspython failed to resolve dns (A) with error: {e}')
|
print_error(f'dnspython failed to resolve dns (A) with error: {e}')
|
||||||
|
|
Loading…
Add table
Reference in a new issue