1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-24 07:37:04 +00:00
This commit is contained in:
David Duque 2020-05-28 16:17:10 +01:00
parent 235ebe9a4a
commit 8ca58798e4
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A

View File

@ -918,7 +918,7 @@ def set_secondary_dns(hostnames, env):
raise ValueError("That's neither an IPv4 or IPv6 subnet.") raise ValueError("That's neither an IPv4 or IPv6 subnet.")
else: else:
v = ipaddress.ip_address(item[4:]) # raises a ValueError if there's a problem v = ipaddress.ip_address(item[4:]) # raises a ValueError if there's a problem
if not isinstance(v, ipaddress.IPv4Network) and not isinstance(v, ipaddress.IPv6Network): if not isinstance(v, ipaddress.IPv4Address) and not isinstance(v, ipaddress.IPv6Address):
raise ValueError("That's neither an IPv4 or IPv6 address.") raise ValueError("That's neither an IPv4 or IPv6 address.")
except ValueError: except ValueError:
raise ValueError("'%s' is not an IPv4 or IPv6 address or subnet." % item[4:]) raise ValueError("'%s' is not an IPv4 or IPv6 address or subnet." % item[4:])