From d4234242bb810d7840ec7e2c4c9f877f53b2210b Mon Sep 17 00:00:00 2001 From: MotoKen Date: Tue, 20 Mar 2012 13:46:38 +0800 Subject: Fixes bug 957708. Work around bug in netaddr 0.7.5 https://github.com/drkjam/netaddr/issues/2 Change-Id: I3e064860c3865d5029481e6d63c5284d275a0081 --- nova/utils.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit