Changed Exception in MAC class

This commit is contained in:
Dominique Roux 2020-01-29 17:06:54 +01:00
parent dfa4e16806
commit d8a465bca4

View file

@ -46,7 +46,9 @@ class MAC(object):
@staticmethod
def validate_mac(mac):
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):
if not self.no_db: