summaryrefslogtreecommitdiffstats
path: root/nova/ipv6
diff options
context:
space:
mode:
authorKen Pepple <ken.pepple@gmail.com>2011-08-21 17:55:54 -0700
committerKen Pepple <ken.pepple@gmail.com>2011-08-21 17:55:54 -0700
commit326cfda8cc50f5db083e9df381d3109e0302605d (patch)
treefd1bc9cf2930f1884d77ba8a1c0c69d8088d381e /nova/ipv6
parent43e2ca531f0fdea5173b7f237627fc3543caf13b (diff)
downloadnova-326cfda8cc50f5db083e9df381d3109e0302605d.tar.gz
nova-326cfda8cc50f5db083e9df381d3109e0302605d.tar.xz
nova-326cfda8cc50f5db083e9df381d3109e0302605d.zip
added exception catch for bad prefix and matching test
Diffstat (limited to 'nova/ipv6')
-rw-r--r--nova/ipv6/account_identifier.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/ipv6/account_identifier.py b/nova/ipv6/account_identifier.py
index 02b653925..4ca7b5983 100644
--- a/nova/ipv6/account_identifier.py
+++ b/nova/ipv6/account_identifier.py
@@ -36,6 +36,8 @@ def to_global(prefix, mac, project_id):
return (project_hash ^ static_num ^ mac_addr | maskIP).format()
except netaddr.AddrFormatError:
raise TypeError(_('Bad mac for to_global_ipv6: %s') % mac)
+ except TypeError:
+ raise TypeError(_('Bad prefix for to_global_ipv6: %s') % prefix)
def to_mac(ipv6_address):