Browse Source

- add logging to login method

git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@190 a67ec6bc-e5d5-0310-a910-815c51eb3124
master
Jan Dittberner 16 years ago
parent
commit
572b42a706
  1. 6
      backend/GnuviechAdmin/SessionManager.py

6
backend/GnuviechAdmin/SessionManager.py

@ -35,6 +35,9 @@ class Session:
return self._timeoutTimer
class SessionManager:
"""
The Sessionmanager provides methods for login and session handling.
"""
def __init__(self, dbconn):
self._sessions = {}
self._dbconn = dbconn
@ -56,7 +59,10 @@ class SessionManager:
sessionid = self._hashobj.hexdigest()
self._sessions[sessionid] = Session(sessionid, login)
self.updateSession(sessionid)
self.logger.info('New session with id %s created for %s' %
(sessionid, login))
return sessionid
self.logger.info('Login for %s failed' % login)
raise InvalidLoginError
def updateSession(self, sessionid):

Loading…
Cancel
Save