mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
script: fix deprecation warning in makeseeds.py
makeseeds.py:139: DeprecationWarning: please use dns.resolver.resolve() instead asn = int([x.to_text() for x in dns.resolver.query('.'.join( per https://dnspython.readthedocs.io/en/latest/whatsnew.html dns.resolver.query() was deprecated in dnspython version 2.0.0
This commit is contained in:
parent
b6a00e76ab
commit
dd7b5f46d8
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ def lookup_asn(net, ip):
|
|||
ipaddr = res.rstrip('.') # 2.0.0.1.4.8.6.0.b.0.0.2.0.0.2.3
|
||||
prefix = '.origin6'
|
||||
|
||||
asn = int([x.to_text() for x in dns.resolver.query('.'.join(
|
||||
asn = int([x.to_text() for x in dns.resolver.resolve('.'.join(
|
||||
reversed(ipaddr.split('.'))) + prefix + '.asn.cymru.com',
|
||||
'TXT').response.answer][0].split('\"')[1].split(' ')[0])
|
||||
return asn
|
||||
|
|
Loading…
Add table
Reference in a new issue