[Mpuls-commits] r160 - in waska/trunk: . waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Sep 15 11:29:55 CEST 2008
Author: teichmann
Date: 2008-09-15 11:29:54 +0200 (Mon, 15 Sep 2008)
New Revision: 160
Modified:
waska/trunk/ChangeLog.txt
waska/trunk/waskaweb/lib/security.py
Log:
Login: Issue COMMIT after updating the last login time. Clean up usage of connection pool.
Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt 2008-09-12 18:17:40 UTC (rev 159)
+++ waska/trunk/ChangeLog.txt 2008-09-15 09:29:54 UTC (rev 160)
@@ -1,3 +1,9 @@
+2008-09-15 Sascha L. Teichmann <sascha.teichmann at intevation.de>
+
+ * waskaweb/lib/security.py: Clean up usage db connection pool during
+ login. Issue COMMIT after update last login time. Hopefully this
+ solves the problem of the none persistent last login time.
+
2008-09-12 Torsten Irlaender <torsten.irlaender at intevation.de>
Changed version string to 1.4.0 preview 2
Modified: waska/trunk/waskaweb/lib/security.py
===================================================================
--- waska/trunk/waskaweb/lib/security.py 2008-09-12 18:17:40 UTC (rev 159)
+++ waska/trunk/waskaweb/lib/security.py 2008-09-15 09:29:54 UTC (rev 160)
@@ -126,12 +126,15 @@
return None
# UPDATE last login time
+ conn, cursor = None, None
try:
+ conn = db.getConnection()
cursor = conn.cursor()
if data:
try:
fields = {'user_id': data.get('id')}
cursor.execute(UPDATE_LASTLOGIN_SQL, fields)
+ conn.commit()
except StandardError, err:
traceback.print_exc(file=sys.stderr)
print "Error on setting last logintime: %s" % cursor.query
More information about the Mpuls-commits
mailing list