From 912ffed14090eb8659c9850dc52a88038e960293 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 11 Jan 2007 18:09:08 +0000 Subject: Use dict.get() to prevent a potential (bug unlikely) KeyError. svn path=/main/trunk/; revision=5554 --- pym/portage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22