diff options
author | Jon Atack <jon@atack.com> | 2020-11-02 20:14:30 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-11-02 20:54:57 +0100 |
commit | dd7b5f46d85401254630abf6976f59b5b8eed181 (patch) | |
tree | fdf47eb370add869f13eaf65e99ded1d4478ae90 /contrib/seeds | |
parent | b6a00e76ab6f9efa1c30b65aa33f8faaf4b50b5b (diff) |
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
Diffstat (limited to 'contrib/seeds')
-rwxr-xr-x | contrib/seeds/makeseeds.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index e8698994f1..57eea25f2c 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -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 |