X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fipsilon.git;a=blobdiff_plain;f=ipsilon%2Flogin%2Fauthfas.py;fp=ipsilon%2Flogin%2Fauthfas.py;h=1489f73947910964abfa970f9cdf58ca7c7acab3;hp=4ae0dc43ab31bca0598819223d01f3d32fe43be9;hb=aa5dc3b417db962a075a092d0d3528010c1059f7;hpb=1e2cb84b570cfaa5d2de9d5830a752100cac236c diff --git a/ipsilon/login/authfas.py b/ipsilon/login/authfas.py index 4ae0dc4..1489f73 100644 --- a/ipsilon/login/authfas.py +++ b/ipsilon/login/authfas.py @@ -7,6 +7,7 @@ from ipsilon.util.plugin import PluginObject from ipsilon.util.policy import Policy from ipsilon.util import config as pconfig import cherrypy +import logging from fedora.client.fasproxy import FasProxyClient from fedora.client import AuthError @@ -54,9 +55,12 @@ class FAS(LoginFormBase): try: _, data = self.lm.fpc.login(username, password) except AuthError, e: - cherrypy.log.error("Authentication error [%s]" % str(e)) + cherrypy.log.error("Authentication error [%s]" % str(e), + severity=logging.ERROR) except Exception, e: # pylint: disable=broad-except - cherrypy.log.error("Unknown Error [%s]" % str(e)) + cherrypy.log.error("Unknown Error [%s]" % str(e), + severity=logging.ERROR) + if data and data.user: userdata = self.make_userdata(data.user) return self.lm.auth_successful(self.trans, @@ -64,10 +68,10 @@ class FAS(LoginFormBase): userdata=userdata) else: error = "Authentication failed" - cherrypy.log.error(error) + cherrypy.log.error(error, severity=logging.ERROR) else: error = "Username or password is missing" - cherrypy.log.error("Error: " + error) + cherrypy.log.error("Error: " + error, severity=logging.ERROR) context = self.create_tmpl_context( username=username,