Skip to content

Commit c21927b

Browse files
author
Richard Jones
committed
handle older sessions
1 parent 14f19ff commit c21927b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Fixed:
2121
- edit collision detection was broken for index-page edits
2222
- sqlite backend wasn't migrating multilink tables correctly
2323
- use SimpleCookie instead of Cookie (is an alias for the evil SmartCookie)
24+
- handle older sessions in session dbm
2425

2526

2627
2004-03-24 0.7.0b1

roundup/backends/sessions_dbm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: sessions_dbm.py,v 1.2 2004-03-19 04:47:59 richard Exp $
1+
#$Id: sessions_dbm.py,v 1.3 2004-03-26 23:54:40 richard Exp $
22
"""This module defines a very basic store that's used by the CGI interface
33
to store session and one-time-key information.
44
@@ -131,7 +131,8 @@ def clean(self, now):
131131
"""
132132
week = 60*60*24*7
133133
for sessid in self.list():
134-
interval = now - self.get(sessid, '__timestamp')
134+
interval = now - self.get(sessid, '__timestamp',
135+
default=time.time())
135136
if interval > week:
136137
self.destroy(sessid)
137138

0 commit comments

Comments
 (0)