summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-28 10:12:32 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-28 10:12:32 +0000
commit0860c376d8d238d07b98220aa91c3f83bc00ee24 (patch)
tree6534fa78e3b5e93857b3a5f593d99867f6e837ac
parentBug #211554 - Replace references to config["USE"] with references to (diff)
downloadportage-multirepo-0860c376d8d238d07b98220aa91c3f83bc00ee24.tar.gz
portage-multirepo-0860c376d8d238d07b98220aa91c3f83bc00ee24.tar.bz2
portage-multirepo-0860c376d8d238d07b98220aa91c3f83bc00ee24.zip
Fix some references to config["PORTAGE_USE"] to prevent potential
KeyErrors. svn path=/main/trunk/; revision=9393
-rw-r--r--pym/portage/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 634fe4ce..0dfde8df 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1913,7 +1913,7 @@ class config(object):
if "test" in self.features:
test_use_changed = \
bool(re.search(r'(^|\s)[-+]?test(\s|$)', iuse)) != \
- ("test" in self.get("PORTAGE_USE","").split())
+ ("test" in self["USE"].split())
if self.get("EBUILD_PHASE") or \
self._use_wildcards or \
test_use_changed:
@@ -2677,7 +2677,7 @@ class config(object):
mydict[k] = v
# Filtered by IUSE and implicit IUSE.
- mydict["USE"] = self["PORTAGE_USE"]
+ mydict["USE"] = self.get("PORTAGE_USE", "")
# sandbox's bashrc sources /etc/profile which unsets ROOTPATH,
# so we have to back it up and restore it.
@@ -2703,7 +2703,7 @@ class config(object):
def selinux_enabled(self):
if getattr(self, "_selinux_enabled", None) is None:
self._selinux_enabled = 0
- if "selinux" in self["PORTAGE_USE"].split():
+ if "selinux" in self["USE"].split():
if "selinux" in globals():
if selinux.is_selinux_enabled() == 1:
self._selinux_enabled = 1