Handle NXDOMAIN exception to avoid stoping the process.

fix #3388
This commit is contained in:
Antoine Nguyen
2025-07-11 19:05:37 +02:00
parent 407b001b72
commit 6f3500471c
+2 -2
View File
@@ -185,7 +185,7 @@ def get_authoritative_server(domain, resolver=None):
return str(first_answer.target)
if hasattr(first_answer, "address"):
return str(first_answer.address)
except dns.resolver.NoAnswer:
except (dns.resolver.NoAnswer, dns.resolver.NXDOMAIN):
dnsname = dnsname.parent()
else:
dnsname = dnsname.parent()
@@ -298,7 +298,7 @@ def make_password():
allow_special_characters = bool(
param_tools.get_global_parameter("allow_special_characters", app="core")
)
for i in range(10): # limit tries
for _i in range(10): # limit tries
all_possible_chars = ""
possible_chars_types = [string.ascii_letters, string.digits]
certain_chars = ""