diff --git a/uncloud/hack/mac.py b/uncloud/hack/mac.py index 66286dd..e35cd9f 100755 --- a/uncloud/hack/mac.py +++ b/uncloud/hack/mac.py @@ -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: