1
0
Fork 0

- add logging to login method

git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@190 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
Jan Dittberner 2006-04-19 09:19:10 +00:00
parent 68431035d0
commit 572b42a706

View file

@ -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):