From 8396e2c5a880042eda2c9549a9f6e9651bb68b93 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 24 Oct 2014 18:01:04 -0400 Subject: [PATCH] Use self.log in authpam.py Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/login/authpam.py | 9 ++++----- 1 file 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, -- 2.20.1