summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index d264ef68e..ef9e9b5c7 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7164,6 +7164,11 @@ if 'selinux' in settings["USE"].split(" "):
except ImportError:
writemsg(red("!!! SELinux module not found.")+" Please verify that it was installed.\n")
selinux_enabled=0
+ if selinux_enabled == 0:
+ try:
+ del sys.modules["selinux"]
+ except KeyError:
+ pass
else:
selinux_enabled=0