Fix dns query could throw different kinds of exceptions

This commit is contained in:
Son NK 2020-01-02 22:08:37 +01:00
parent 2a05e320e1
commit be1b689463
1 changed files with 1 additions and 1 deletions

View File

@ -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 = []