fix: don't fail DNS resolution on NoAnswer
This commit is contained in:
parent
4781e088a3
commit
524a45fbc3
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ def main() -> None:
|
||||||
try:
|
try:
|
||||||
res = resolver.resolve(record_name, 'TXT')
|
res = resolver.resolve(record_name, 'TXT')
|
||||||
values = list(map(lambda rdata: rdata.to_text().strip('"'), res))
|
values = list(map(lambda rdata: rdata.to_text().strip('"'), res))
|
||||||
except dns.resolver.NXDOMAIN:
|
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
|
||||||
values = []
|
values = []
|
||||||
log.info('response from DNS: %s', values)
|
log.info('response from DNS: %s', values)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue