From 5a885ab7bd42e08c43294c94b6a6b5308476f8c1 Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Sun, 2 Oct 2005 03:52:41 +0000 Subject: saner handling of selinux_enabled svn path=/main/branches/2.0/; revision=2070 --- pym/portage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pym') diff --git a/pym/portage.py b/pym/portage.py index fbb7711b6..2137a7b87 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7253,7 +7253,10 @@ settings.lock() if 'selinux' in settings["USE"].split(" "): try: import selinux - selinux_enabled=1 + if hasattr(selinux, "enabled"): + selinux_enabled = selinux.enabled + else: + selinux_enabled = 1 except OSError, e: writemsg(red("!!! SELinux not loaded: ")+str(e)+"\n") selinux_enabled=0 -- cgit v1.2.3-1-g7c22