update warning's message
This commit is contained in:
@ -802,13 +802,13 @@ class IPOption(Option):
|
||||
ip = IP('{0}/32'.format(value))
|
||||
if not self._allow_reserved and ip.iptype() == 'RESERVED':
|
||||
if warnings_only:
|
||||
msg = _("IP shouldn't be in reserved class")
|
||||
msg = _("IP is in reserved class")
|
||||
else:
|
||||
msg = _("invalid IP, mustn't be in reserved class")
|
||||
raise ValueError(msg)
|
||||
if self._private_only and not ip.iptype() == 'PRIVATE':
|
||||
if warnings_only:
|
||||
msg = _("IP should be in private class")
|
||||
msg = _("IP is not in private class")
|
||||
else:
|
||||
msg = _("invalid IP, must be in private class")
|
||||
raise ValueError(msg)
|
||||
@ -921,7 +921,7 @@ class NetworkOption(Option):
|
||||
ip = IP(value)
|
||||
if ip.iptype() == 'RESERVED':
|
||||
if warnings_only:
|
||||
msg = _("network address shouldn't be in reserved class")
|
||||
msg = _("network address is in reserved class")
|
||||
else:
|
||||
msg = _("invalid network address, mustn't be in reserved class")
|
||||
raise ValueError(msg)
|
||||
|
Reference in New Issue
Block a user