From 23a3278f3f0b861a81836a819fd9f55cbb37ed1e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 22 Sep 2008 20:28:15 +0000 Subject: Bug #230975 - Rename the portage.selinux module to portage._selinux in order to avoid a relative import issue which caused portage.selinux to attempt to import itself instead of the real 'selinux' module. Thanks to Michael Edenfield for this patch. svn path=/main/trunk/; revision=11535 --- pym/portage/__init__.py | 2 +- pym/portage/_selinux.py | 8 ++++++++ pym/portage/selinux.py | 8 -------- 3 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 pym/portage/_selinux.py delete mode 100644 pym/portage/selinux.py (limited to 'pym') diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 207432f35..79d99f813 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -140,7 +140,7 @@ except ImportError, e: try: - import portage.selinux as selinux + import portage._selinux as selinux except OSError, e: writemsg("!!! SELinux not loaded: %s\n" % str(e), noiselevel=-1) del e diff --git a/pym/portage/_selinux.py b/pym/portage/_selinux.py new file mode 100644 index 000000000..e4d80fa1e --- /dev/null +++ b/pym/portage/_selinux.py @@ -0,0 +1,8 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +import selinux +from selinux import is_selinux_enabled +from selinux_aux import setexec, secure_symlink, secure_rename, \ + secure_copy, secure_mkdir, getcontext, get_sid, get_lsid diff --git a/pym/portage/selinux.py b/pym/portage/selinux.py deleted file mode 100644 index e4d80fa1e..000000000 --- a/pym/portage/selinux.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -import selinux -from selinux import is_selinux_enabled -from selinux_aux import setexec, secure_symlink, secure_rename, \ - secure_copy, secure_mkdir, getcontext, get_sid, get_lsid -- cgit v1.2.3-1-g7c22