Fix dns query could throw different kinds of exceptions
This commit is contained in:
parent
2a05e320e1
commit
be1b689463
|
@ -7,7 +7,7 @@ def get_mx_domains(hostname) -> [(int, str)]:
|
|||
"""
|
||||
try:
|
||||
answers = dns.resolver.query(hostname, "MX")
|
||||
except dns.resolver.NoAnswer:
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
ret = []
|
||||
|
|
Loading…
Reference in New Issue