Avoid possible AttributeError raised from _ObjectKey.__eq__().
authorZac Medico <zmedico@gentoo.org>
Sun, 24 Aug 2008 17:21:47 +0000 (17:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 24 Aug 2008 17:21:47 +0000 (17:21 -0000)
svn path=/main/trunk/; revision=11466

pym/portage/dbapi/vartree.py

index aa7c9c3fe36d2f66a514e387fee0d979e16efb9a..b3eefe8c456ddbb1cd7e3ae7f6079c59e8bf938b 100644 (file)
@@ -167,6 +167,8 @@ class LinkageMap(object):
                        return hash(self._key)
 
                def __eq__(self, other):
+                       if not isinstance(other, self.__class__):
+                               return False
                        return self._key == other._key
 
                def _generate_object_key(self, object):