Merge "netaddr<=0.7.10 raises ValueError instead of AddrFormatError"

This commit is contained in:
Jenkins 2014-04-18 06:05:15 +00:00 committed by Gerrit Code Review
commit f3b8b4b9db

View File

@ -167,7 +167,7 @@ def convert_ip_prefix_to_cidr(ip_prefix):
try:
cidr = netaddr.IPNetwork(ip_prefix)
return str(cidr)
except (TypeError, netaddr.AddrFormatError):
except (ValueError, TypeError, netaddr.AddrFormatError):
raise qexception.InvalidCIDR(input=ip_prefix)