diff --git a/nyacme/hook.py b/nyacme/hook.py index e2fb34c..a0c1c93 100644 --- a/nyacme/hook.py +++ b/nyacme/hook.py @@ -60,7 +60,7 @@ def main() -> None: try: res = resolver.resolve(record_name, 'TXT') values = list(map(lambda rdata: rdata.to_text().strip('"'), res)) - except dns.resolver.NXDOMAIN: + except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer): values = [] log.info('response from DNS: %s', values)