]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/meta.py
Some refactoring around Exceptions
[mpd-sima.git] / sima / lib / meta.py
index 9e858a2bc972ffc1ef557bc27c41beb6f37cbf60..4ff560110d0b3e1186f1d7fd497beb2f758f7450 100644 (file)
@@ -26,11 +26,15 @@ from collections.abc import Set
 import logging
 import re
 
+from ..utils.utils import MPDSimaException
+
+
 UUID_RE = r'^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[89AB][a-f0-9]{3}-[a-f0-9]{12}$'
 #: The Track Object is collapsing multiple tags into a single string using this
 # separator. It is used then to split back the string to tags list.
 SEPARATOR = chr(0x1F)  # ASCII Unit Separator
 
+
 def is_uuid4(uuid):
     """Controls MusicBrainz UUID4 format
 
@@ -42,7 +46,8 @@ def is_uuid4(uuid):
         return True
     return False
 
-class MetaException(Exception):
+
+class MetaException(MPDSimaException):
     """Generic Meta Exception"""
 
 
@@ -170,7 +175,7 @@ class Meta:
     @property
     def names(self):
         """aliases + name"""
-        return self.__aliases | {self.__name,}
+        return self.__aliases | {self.__name, }
 
     @property
     @serialize