From e1c79db85714d1de558671d116cc225e480a629d Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 13 Nov 2022 18:48:45 +0100 Subject: [PATCH] Fix dns query for old dnspython lib --- commands/pyyg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/pyyg.py b/commands/pyyg.py index b91e059..f54c17c 100644 --- a/commands/pyyg.py +++ b/commands/pyyg.py @@ -41,13 +41,13 @@ class DNSAdapter(adapters.HTTPAdapter): if HAS_IPV6: try: - answers_v6 = DNS_RESOLVER.resolve(host, rdatatype.AAAA) + answers_v6 = DNS_RESOLVER.query(host, rdatatype.AAAA) for rdata_v6 in answers_v6: return f"[{str(rdata_v6)}]" except resolver.NoAnswer: pass - answers_v4 = DNS_RESOLVER.resolve(host, rdatatype.A) + answers_v4 = DNS_RESOLVER.query(host, rdatatype.A) for rdata_v4 in answers_v4: return str(rdata_v4)