summaryrefslogtreecommitdiffstats
path: root/security.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-08-12 17:02:54 +0000
committerChris Lumens <clumens@redhat.com>2005-08-12 17:02:54 +0000
commitad06ecd663388d31e24ed8a915cbb75c8c09e5e3 (patch)
tree7ec622b907c6b5ba672512bba993a0e109cfdb18 /security.py
parentbe9b1d17b23f3075f12a939cc7d11fe8687edcc9 (diff)
downloadanaconda-ad06ecd663388d31e24ed8a915cbb75c8c09e5e3.tar.gz
anaconda-ad06ecd663388d31e24ed8a915cbb75c8c09e5e3.tar.xz
anaconda-ad06ecd663388d31e24ed8a915cbb75c8c09e5e3.zip
Use new logging system.
Diffstat (limited to 'security.py')
-rw-r--r--security.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/security.py b/security.py
index 67f77ba65..926bc30ed 100644
--- a/security.py
+++ b/security.py
@@ -17,7 +17,8 @@ import os, string
import iutil
from flags import flags
-from rhpl.log import log
+import logging
+log = logging.getLogger("anaconda")
SEL_DISABLED = 0
SEL_PERMISSIVE = 1
@@ -36,7 +37,7 @@ class Security:
def setSELinux(self, val):
if not selinux_states.has_key(val):
- log("Tried to set to invalid SELinux state: %s" %(val,))
+ log.error("Tried to set to invalid SELinux state: %s" %(val,))
val = SEL_DISABLED
self.selinux = val
@@ -46,7 +47,7 @@ class Security:
def writeKS(self, f):
if not selinux_states.has_key(self.selinux):
- log("ERROR: unknown selinux state: %s" %(self.selinux,))
+ log.error("unknown selinux state: %s" %(self.selinux,))
return
f.write("selinux --%s\n" %(selinux_states[self.selinux],))
@@ -55,7 +56,7 @@ class Security:
args = [ "/usr/sbin/lokkit", "--quiet", "--nostart" ]
if not selinux_states.has_key(self.selinux):
- log("ERROR: unknown selinux state: %s" %(self.selinux,))
+ log.error("unknown selinux state: %s" %(self.selinux,))
return
args = args + [ "--selinux=%s" %(selinux_states[self.selinux],) ]
@@ -65,10 +66,10 @@ class Security:
iutil.execWithRedirect(args[0], args, root = instPath,
stdout = None, stderr = None)
else:
- log("would have run %s", args)
+ log.error("would have run %s", args)
except RuntimeError, msg:
- log ("lokkit run failed: %s", msg)
+ log.error ("lokkit run failed: %s", msg)
except OSError, (errno, msg):
- log ("lokkit run failed: %s", msg)
+ log.error ("lokkit run failed: %s", msg)