summaryrefslogtreecommitdiffstats
path: root/ipsilon/login
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-10-24 18:01:04 -0400
committerPatrick Uiterwijk <puiterwijk@redhat.com>2014-10-27 14:58:27 +0100
commit8396e2c5a880042eda2c9549a9f6e9651bb68b93 (patch)
tree08de40450236e6a7bde46a0f8c06152f8dca7a6a /ipsilon/login
parent965e6299f409e6eacf3490a11f8161ea643ac2f8 (diff)
downloadipsilon-8396e2c5a880042eda2c9549a9f6e9651bb68b93.tar.gz
ipsilon-8396e2c5a880042eda2c9549a9f6e9651bb68b93.tar.xz
ipsilon-8396e2c5a880042eda2c9549a9f6e9651bb68b93.zip
Use self.log in authpam.py
Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'ipsilon/login')
-rwxr-xr-xipsilon/login/authpam.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/ipsilon/login/authpam.py b/ipsilon/login/authpam.py
index fca44ba..35edbaf 100755
--- a/ipsilon/login/authpam.py
+++ b/ipsilon/login/authpam.py
@@ -20,7 +20,6 @@
from ipsilon.login.common import LoginFormBase, LoginManagerBase
from ipsilon.login.common import FACILITY
from ipsilon.util.plugin import PluginObject
-import cherrypy
import pam
import subprocess
@@ -34,10 +33,10 @@ class Pam(LoginFormBase):
ok = pam.authenticate(username, password)
if ok:
- cherrypy.log("User %s successfully authenticated." % username)
+ self.log("User %s successfully authenticated." % username)
return username
- cherrypy.log("User %s failed authentication." % username)
+ self.log("User %s failed authentication." % username)
return None
def POST(self, *args, **kwargs):
@@ -52,10 +51,10 @@ class Pam(LoginFormBase):
return self.lm.auth_successful(self.trans, user, 'password')
else:
error = "Authentication failed"
- cherrypy.log.error(error)
+ self.error(error)
else:
error = "Username or password is missing"
- cherrypy.log.error("Error: " + error)
+ self.error("Error: " + error)
context = self.create_tmpl_context(
username=username,