projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8cdec9
)
Handle AttributeError instead of using getattr. Thanks to Marat Radchenko
author
Zac Medico
<zmedico@gentoo.org>
Mon, 7 Sep 2009 02:41:01 +0000
(
02:41
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 7 Sep 2009 02:41:01 +0000
(
02:41
-0000)
<slonopotamusorama@gmail.com> for reporting.
svn path=/main/trunk/; revision=14209
pym/_emerge/Task.py
patch
|
blob
|
history
diff --git
a/pym/_emerge/Task.py
b/pym/_emerge/Task.py
index d218ba360d3b682ccb99e717d35b0544e7f295cc..0cd545500b1d7cbffd06e4e38790c99c3c4fe677 100644
(file)
--- a/
pym/_emerge/Task.py
+++ b/
pym/_emerge/Task.py
@@
-7,10
+7,10
@@
class Task(SlotObject):
__slots__ = ("_hash_key", "_hash_value")
def _get_hash_key(self):
- hash_key = getattr(self, "_hash_key", None)
- if hash_key is None:
+ try:
+ return self._hash_key
+ except AttributeError:
raise NotImplementedError(self)
- return hash_key
def __eq__(self, other):
return self._get_hash_key() == other