From d8a465bca46e7d693fb4bf32745f170b89ffa5b1 Mon Sep 17 00:00:00 2001 From: Dominique Roux Date: Wed, 29 Jan 2020 17:06:54 +0100 Subject: [PATCH] Changed Exception in MAC class --- uncloud/hack/mac.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: