summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-11 18:09:08 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-11 18:09:08 +0000
commit912ffed14090eb8659c9850dc52a88038e960293 (patch)
treebd08596ad7ea59e5d6bc5c689aac8ca1780774e9 /pym/portage.py
parentUse isinstance(foo, basestring) so that it can work with unicode strings too. (diff)
downloadportage-multirepo-912ffed14090eb8659c9850dc52a88038e960293.tar.gz
portage-multirepo-912ffed14090eb8659c9850dc52a88038e960293.tar.bz2
portage-multirepo-912ffed14090eb8659c9850dc52a88038e960293.zip
Use dict.get() to prevent a potential (bug unlikely) KeyError.
svn path=/main/trunk/; revision=5554
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py
index b0505fba..4bf3a935 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1884,13 +1884,13 @@ class config:
myflags = set(myflags)
myflags.update(self.useforce)
+ # FEATURES=test should imply USE=test
+ if "test" in self.configlist[-1].get("FEATURES","").split():
+ myflags.add("test")
+
usesplit = [ x for x in myflags if \
x not in self.usemask]
- # FEATURES=test should imply USE=test
- if "test" in self.configlist[-1]["FEATURES"] and not "test" in usesplit:
- usesplit.append("test")
-
usesplit.sort()
# Use the calculated USE flags to regenerate the USE_EXPAND flags so