From: Fabian Groffen Date: Sun, 24 Aug 2008 17:47:09 +0000 (-0000) Subject: Apply the same string fix to the LinkageMapMachO... this situation starts to become... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=ed1166d0b4547d3305e60e9643afec0ec876ae95;p=portage.git Apply the same string fix to the LinkageMapMachO... this situation starts to become very unhealthy svn path=/main/branches/prefix/; revision=11469 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index c1aba2a9c..92eb1134c 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -610,6 +610,8 @@ class LinkageMapMachO(object): """Helper class used as _obj_properties keys for objects.""" + __slots__ = ("__weakref__", "_key") + def __init__(self, object): """ This takes a path to an object. @@ -624,7 +626,11 @@ class LinkageMapMachO(object): return hash(self._key) def __eq__(self, other): - return self._key == other._key + if isinstance(other, self.__class__): + other_key = other._key + else: + other_key = other + return self._key == other_key def _generate_object_key(self, object): """