update warning's message

This commit is contained in:
2014-03-24 21:13:26 +01:00
parent a04a61f1a4
commit b3d04a1f68
3 changed files with 292 additions and 292 deletions

View File

@ -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)