1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-24 02:37:05 +00:00

replace exception pass with error message

This commit is contained in:
KiekerJan 2022-10-23 23:35:37 +02:00
parent 6336dbbff7
commit c462008a5e

View File

@ -1040,7 +1040,7 @@ def set_secondary_dns(hostnames, env):
try: try:
response = resolver.resolve(item, "AAAA") response = resolver.resolve(item, "AAAA")
except (dns.resolver.NoNameservers, dns.resolver.NXDOMAIN, dns.resolver.NoAnswer): except (dns.resolver.NoNameservers, dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
pass raise ValueError("Could not resolve the IP address of %s due to dns error." % item)
except (dns.resolver.Timeout): except (dns.resolver.Timeout):
raise ValueError("Could not resolve the IP address of %s due to timeout." % item) raise ValueError("Could not resolve the IP address of %s due to timeout." % item)
except (dns.resolver.Timeout): except (dns.resolver.Timeout):