diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-11-26 17:28:51 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-11-26 17:28:51 +0000 |
commit | 5110f6cf1561f95a5da9b1a578c68fe38ffcf4c2 (patch) | |
tree | 665328ca7a233e87820ad950e71079bf77eeeb93 | |
parent | 48e68662cf7ab600859c434ba3108b8f2ff24199 (diff) | |
download | portage-5110f6cf1561f95a5da9b1a578c68fe38ffcf4c2.tar.gz portage-5110f6cf1561f95a5da9b1a578c68fe38ffcf4c2.tar.bz2 portage-5110f6cf1561f95a5da9b1a578c68fe38ffcf4c2.zip |
Implement config.pop().
svn path=/main/trunk/; revision=8688
-rw-r--r-- | pym/portage/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 04b73b1b8..2fecfef38 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -2470,6 +2470,12 @@ class config(object): return d[k] return x + def pop(self, k, x=None): + v = x + for d in reversed(self.lookuplist): + v = d.pop(k, v) + return v + def has_key(self,mykey): return mykey in self |