Skip to content

Commit

Permalink
Fixes bug 957708.
Browse files Browse the repository at this point in the history
Work around bug in netaddr 0.7.5
netaddr/netaddr#2

Change-Id: I3e064860c3865d5029481e6d63c5284d275a0081
  • Loading branch information
motokentsai authored and vishvananda committed Mar 30, 2012
1 parent ada63db commit 649bcc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nova/utils.py
Expand Up @@ -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
Expand Down

0 comments on commit 649bcc5

Please sign in to comment.