diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-11 18:09:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-11 18:09:08 +0000 |
commit | 912ffed14090eb8659c9850dc52a88038e960293 (patch) | |
tree | bd08596ad7ea59e5d6bc5c689aac8ca1780774e9 | |
parent | e6637d3b148817c179f2eb4dea7a9e7f8f237680 (diff) | |
download | portage-912ffed14090eb8659c9850dc52a88038e960293.tar.gz portage-912ffed14090eb8659c9850dc52a88038e960293.tar.bz2 portage-912ffed14090eb8659c9850dc52a88038e960293.zip |
Use dict.get() to prevent a potential (bug unlikely) KeyError.
svn path=/main/trunk/; revision=5554
-rw-r--r-- | pym/portage.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py index b0505fba9..4bf3a9353 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 |