From: Simo Sorce Date: Fri, 24 Oct 2014 22:01:04 +0000 (-0400) Subject: Use self.log in authpam.py X-Git-Tag: v0.3.0~40 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fipsilon.git;a=commitdiff_plain;h=8396e2c5a880042eda2c9549a9f6e9651bb68b93 Use self.log in authpam.py Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- 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,