projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f73f7ad
)
Implement __contains__ for portage.config so that it calls has_key, enabling membersh...
author
Zac Medico
<zmedico@gentoo.org>
Thu, 16 Mar 2006 09:37:59 +0000
(09:37 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 16 Mar 2006 09:37:59 +0000
(09:37 -0000)
svn path=/main/trunk/; revision=2907
pym/portage.py
patch
|
blob
|
history
diff --git
a/pym/portage.py
b/pym/portage.py
index cf76952d056ea0c904e1a08aa86e63c2280e50a0..00f0822ae03044b9622a75a7d7a8ceb95fe76068 100644
(file)
--- a/
pym/portage.py
+++ b/
pym/portage.py
@@
-1576,6
+1576,12
@@
class config:
return 1
return 0
+ def __contains__(self, mykey):
+ """Called to implement membership test operators (in and not in)."""
+ if self.has_key(mykey):
+ return True
+ return False
+
def keys(self):
mykeys=[]
for x in self.lookuplist: