summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMotoKen <motokentsai@gmail.com>2012-03-20 13:46:38 +0800
committerMotoKen <motokentsai@gmail.com>2012-03-20 14:55:21 +0800
commitd4234242bb810d7840ec7e2c4c9f877f53b2210b (patch)
tree1b8e930aade1709ebb54da4712b55eafedccf587
parentca989b683a34ba3d64cac5a492ab221490a36c52 (diff)
Fixes bug 957708.
Work around bug in netaddr 0.7.5 https://github.com/drkjam/netaddr/issues/2 Change-Id: I3e064860c3865d5029481e6d63c5284d275a0081
-rw-r--r--nova/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py
index ef2b329ba..819929a81 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -1219,6 +1219,10 @@ def is_valid_cidr(address):
netaddr.IPNetwork(address)
except netaddr.core.AddrFormatError:
return False
+ except UnboundLocalError:
+ # NOTE(MotoKen): work around bug in netaddr 0.7.5 (see detail in
+ # https://github.com/drkjam/netaddr/issues/2)
+ return False
# Prior validation partially verify /xx part
# Verify it here