Changed Exception in MAC class
This commit is contained in:
parent
dfa4e16806
commit
d8a465bca4
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ class MAC(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def validate_mac(mac):
|
def validate_mac(mac):
|
||||||
if not re.match(r'([0-9A-F]{2}[-:]){5}[0-9A-F]{2}$', mac, re.I):
|
if not re.match(r'([0-9A-F]{2}[-:]){5}[0-9A-F]{2}$', mac, re.I):
|
||||||
raise Error("Not a valid mac address: %s" % mac)
|
raise UncloudException("Not a valid mac address: %s" % mac)
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
def last_used_index(self):
|
def last_used_index(self):
|
||||||
if not self.no_db:
|
if not self.no_db:
|
||||||
|
|
Loading…
Reference in a new issue