More error-proofing
This commit is contained in:
parent
0801bd9e44
commit
c409c2cf9b
|
@ -37,6 +37,9 @@ def is_subdomain_matching(subdomain: str) -> bool:
|
|||
except dns.exception.Timeout:
|
||||
print(f"Timeout for {subdomain}", file=sys.stderr)
|
||||
return False
|
||||
except dns.name.EmptyLabel:
|
||||
print(f"Empty label for {subdomain}", file=sys.stderr)
|
||||
return False
|
||||
canonical = query.canonical_name.to_text()
|
||||
for regex in regexes.REGEXES:
|
||||
if re.match(regex, canonical):
|
||||
|
|
Loading…
Reference in a new issue