From 3c36efad5deab96ee24d2fd6d8c3b9600bdaaf31 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Wed, 28 Apr 2010 21:52:05 +0200 Subject: [PATCH] Fix models with respect to comparison with other value --- mopidy/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mopidy/models.py b/mopidy/models.py index 1c52cbd2..c02babce 100644 --- a/mopidy/models.py +++ b/mopidy/models.py @@ -33,7 +33,7 @@ class Artist(ImmutableObject): name = None def __eq__(self, other): - if other is None: + if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ @@ -68,7 +68,7 @@ class Album(ImmutableObject): super(Album, self).__init__(*args, **kwargs) def __eq__(self, other): - if other is None: + if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ @@ -133,7 +133,7 @@ class Track(ImmutableObject): super(Track, self).__init__(*args, **kwargs) def __eq__(self, other): - if other is None: + if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__