From dd7b5f46d85401254630abf6976f59b5b8eed181 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Mon, 2 Nov 2020 20:14:30 +0100 Subject: 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 --- contrib/seeds/makeseeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/seeds/makeseeds.py') 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 -- cgit v1.2.3