]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/meta.py
Big cleanup, pyling warning, style, error
[mpd-sima.git] / sima / lib / meta.py
index f118e82dcfd19c7dce1b3d426ff2c6dd0c08485c..af3e19c14e781622480de208954d1952f745ac08 100644 (file)
@@ -26,6 +26,9 @@ 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.
@@ -44,7 +47,7 @@ def is_uuid4(uuid):
     return False
 
 
-class MetaException(Exception):
+class MetaException(MPDSimaException):
     """Generic Meta Exception"""
 
 
@@ -94,8 +97,7 @@ class Meta:
             raise MetaException('Need a "name" argument (str type)')
         if not isinstance(kwargs.get('name'), str):
             raise MetaException('"name" argument not a string')
-        else:
-            self.__name = kwargs.pop('name').split(SEPARATOR)[0]
+        self.__name = kwargs.pop('name').split(SEPARATOR)[0]
         if 'mbid' in kwargs and kwargs.get('mbid'):
             mbid = kwargs.get('mbid').lower().split(SEPARATOR)[0]
             if is_uuid4(mbid):