From 789dd0e91ed3a1faa60ae1f4a6172b483717e622 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 14 Aug 2009 07:01:32 +0000 Subject: Don't 'del sys.modules["selinux"]' when selinux support isn't enabled in the portage config, because that just assumes too much. svn path=/main/trunk/; revision=14026 --- pym/portage/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pym') diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 6cff57d8f..f20284e30 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3680,11 +3680,7 @@ class config(object): writemsg("!!! SELinux module not found. Please verify that it was installed.\n", noiselevel=-1) self._selinux_enabled = 0 - if self._selinux_enabled == 0: - try: - del sys.modules["selinux"] - except KeyError: - pass + return self._selinux_enabled if sys.hexversion >= 0x3000000: -- cgit v1.2.3-1-g7c22