From 9d18f665c54f750528f0ad2f07fd0812ef70f135 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 26 Aug 2020 19:09:06 +0200 Subject: [PATCH] Accept NoAnswer as a valid DNS response --- usr/lib/python3.8/vmmgr/net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/python3.8/vmmgr/net.py b/usr/lib/python3.8/vmmgr/net.py index 280ec19..b7c2e35 100644 --- a/usr/lib/python3.8/vmmgr/net.py +++ b/usr/lib/python3.8/vmmgr/net.py @@ -44,7 +44,7 @@ def resolve_ip(domain, query_type): # Resolve domain name using Cloudflare Public DNS try: return resolver.query(domain, query_type)[0].address - except dns.resolver.NXDOMAIN: + except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer): return None def ping_url(url):