From: richard Date: Fri, 26 Mar 2004 23:56:11 +0000 (+0000) Subject: better fix X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3497b64a0145728dc5438e805c21383b6375f9a8;p=roundup.git better fix git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2219 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/sessions_dbm.py b/roundup/backends/sessions_dbm.py index 82782d0..33d204f 100644 --- a/roundup/backends/sessions_dbm.py +++ b/roundup/backends/sessions_dbm.py @@ -1,4 +1,4 @@ -#$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. @@ -131,8 +131,11 @@ class BasicDatabase: """ 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)