summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-21 01:40:30 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-21 01:40:30 -0700
commitaefaa5910129b31ec33e2dc02654e79e0611c351 (patch)
tree2daeeb04e7aed86bc253f4f8d00283d84c1370bb
parent8f636333825fa8f134f1a1d84f7e054bbde571ee (diff)
downloadportage-aefaa5910129b31ec33e2dc02654e79e0611c351.tar.gz
portage-aefaa5910129b31ec33e2dc02654e79e0611c351.tar.bz2
portage-aefaa5910129b31ec33e2dc02654e79e0611c351.zip
Task.__eq__: allow _hash_key as input
This is used by depgraph._pkg() for lookups.
-rw-r--r--pym/_emerge/Task.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/_emerge/Task.py b/pym/_emerge/Task.py
index 3e1a4ba62..efbe3a99d 100644
--- a/pym/_emerge/Task.py
+++ b/pym/_emerge/Task.py
@@ -9,7 +9,9 @@ class Task(SlotObject):
try:
return self._hash_key == other._hash_key
except AttributeError:
- return False
+ # depgraph._pkg() generates _hash_key
+ # for lookups here, so handle that
+ return self._hash_key == other
def __ne__(self, other):
try: