mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 00:48:32 +01:00
fix MX record can be unavailable
This commit is contained in:
parent
5854ab8e10
commit
d0f95e81b2
1 changed files with 5 additions and 1 deletions
|
@ -2,7 +2,11 @@ import dns.resolver
|
|||
|
||||
|
||||
def get_mx_domains(hostname) -> [str]:
|
||||
answers = dns.resolver.query(hostname, "MX")
|
||||
try:
|
||||
answers = dns.resolver.query(hostname, "MX")
|
||||
except dns.resolver.NoAnswer:
|
||||
return []
|
||||
|
||||
ret = []
|
||||
|
||||
for a in answers:
|
||||
|
|
Loading…
Reference in a new issue