From ed1166d0b4547d3305e60e9643afec0ec876ae95 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 24 Aug 2008 17:47:09 +0000 Subject: [PATCH] Apply the same string fix to the LinkageMapMachO... this situation starts to become very unhealthy svn path=/main/branches/prefix/; revision=11469 --- pym/portage/dbapi/vartree.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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): """ -- 2.26.2