From: Zac Medico Date: Fri, 14 Aug 2009 07:01:32 +0000 (-0000) Subject: Don't 'del sys.modules["selinux"]' when selinux support isn't enabled in X-Git-Tag: v2.2_rc39~79 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=789dd0e91ed3a1faa60ae1f4a6172b483717e622;p=portage.git 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 --- 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: