]> kaliko git repositories - mpd-sima.git/blobdiff - sima/lib/meta.py
Cleanup PlayerError exception wrapper
[mpd-sima.git] / sima / lib / meta.py
index 4ff560110d0b3e1186f1d7fd497beb2f758f7450..ac5948ab82e1a5aef1cdf247578ee84dca3e2133 100644 (file)
@@ -97,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):
@@ -148,7 +147,7 @@ class Meta:
             if callable(other.__str__) and other.__str__() != self.name:
                 self.__aliases |= {other.__str__()}
         else:
-            raise MetaException('No __str__ method found in {!r}'.format(other))
+            raise MetaException(f'No __str__ method found in {other!r}')
 
     @property
     def name(self):