Merge "netaddr<=0.7.10 raises ValueError instead of AddrFormatError"
This commit is contained in:
commit
f3b8b4b9db
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user