summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d082c1)
raw | patch | inline | side by side (parent: 2d082c1)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 26 Mar 2004 23:56:11 +0000 (23:56 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 26 Mar 2004 23:56:11 +0000 (23:56 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2219 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/backends/sessions_dbm.py | patch | blob | history |
index 82782d005f04b91991d38bf76ce84944c7cfefb7..33d204f322d25b1f9df923113e41b0763968d485 100644 (file)
-#$Id: sessions_dbm.py,v 1.3 2004-03-26 23:54:40 richard Exp $
+#$Id: sessions_dbm.py,v 1.4 2004-03-26 23:56:11 richard Exp $
"""This module defines a very basic store that's used by the CGI interface
to store session and one-time-key information.
"""
week = 60*60*24*7
for sessid in self.list():
- interval = now - self.get(sessid, '__timestamp',
- default=time.time())
+ sess = self.get(sessid, '__timestamp', None)
+ if sess is None:
+ sess=time.time()
+ self.updateTimestamp(sessid)
+ interval = now - sess
if interval > week:
self.destroy(sessid)