You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@warble.apache.org by hu...@apache.org on 2018/06/26 22:05:56 UTC
[incubator-warble-server] 01/05: can't change immutable row
factories, so use a variable
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git
commit 313d055c8ab380f1d6da14fc62316c43cdd03fb0
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Jun 26 16:12:50 2018 -0500
can't change immutable row factories, so use a variable
---
api/plugins/session.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/api/plugins/session.py b/api/plugins/session.py
index d302b45..1603b10 100644
--- a/api/plugins/session.py
+++ b/api/plugins/session.py
@@ -109,8 +109,8 @@ class WarbleSession(object):
sdoc = None # Wipe it!
doc = None
elif age > 3600:
- sdoc['timestamp'] = int(time.time()) # Update timestamp in session DB
- sc.execute("UPDATE `sessions` SET `timestamp` = ? WHERE `cookie` = ? LIMIT 1", (sdoc['timestamp'], cookie,))
+ st = int(time.time()) # Update timestamp in session DB
+ sc.execute("UPDATE `sessions` SET `timestamp` = ? WHERE `cookie` = ? LIMIT 1", (st, cookie,))
if doc:
self.user = {k:doc[k] for k in doc.keys()}
self.user['userlevel'] = 'superuser' if doc['superuser'] else 'normal'
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org