X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Flib%2Fmeta.py;h=e6b9f46229554e008422017281de51db7d9be680;hb=28caa80fbddaca9c7bb83a9d72dfba8130f16e44;hp=5a2305eceb09169663860083bc43b3122a03e4ab;hpb=b36c71a274b677e20147f26ce1dd3c4cc7d94d4e;p=mpd-sima.git diff --git a/sima/lib/meta.py b/sima/lib/meta.py index 5a2305e..e6b9f46 100644 --- a/sima/lib/meta.py +++ b/sima/lib/meta.py @@ -136,12 +136,12 @@ class Meta: :param str other: Alias to add, could be any object with ``__str__`` method. """ + if isinstance(other, Meta): + self.__aliases |= other.__aliases + self.__aliases -= {self.name} if getattr(other, '__str__', None): if callable(other.__str__) and other.__str__() != self.name: self.__aliases |= {other.__str__()} - elif isinstance(other, Meta): - if other.name != self.name: - self.__aliases |= other.__aliases else: raise MetaException('No __str__ method found in {!r}'.format(other)) @@ -158,13 +158,6 @@ class Meta: def mbid(self): return self.__mbid - @mbid.setter - def mbid(self, mbid): - if mbid and not is_uuid4(mbid): - self.log.warning('Wrong mbid %s:%s', self.__name, mbid) - return - self.__mbid = mbid - @property def aliases(self): return self.__aliases