From 3497b64a0145728dc5438e805c21383b6375f9a8 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 26 Mar 2004 23:56:11 +0000 Subject: [PATCH] better fix git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2219 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/backends/sessions_dbm.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) -- 2.30.2