You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by nl...@apache.org on 2005/05/28 11:47:06 UTC
svn commit: r178864 -
/httpd/mod_python/trunk/lib/python/mod_python/Session.py
Author: nlehuen
Date: Sat May 28 02:47:05 2005
New Revision: 178864
URL: http://svn.apache.org/viewcvs?rev=178864&view=rev
Log:
Fix for MODPYTHON-57
Modified:
httpd/mod_python/trunk/lib/python/mod_python/Session.py
Modified: httpd/mod_python/trunk/lib/python/mod_python/Session.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/Session.py?rev=178864&r1=178863&r2=178864&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/Session.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/Session.py Sat May 28 02:47:05 2005
@@ -527,10 +527,13 @@
## MemorySession
def mem_cleanup(sdict):
- for sid in sdict:
- dict = sdict[sid]
- if (time.time() - dict["_accessed"]) > dict["_timeout"]:
- del sdict[sid]
+ for sid in sdict.keys():
+ try:
+ session = sdict[sid]
+ if (time.time() - session["_accessed"]) > session["_timeout"]:
+ del sdict[sid]
+ except:
+ pass
class MemorySession(BaseSession):
@@ -575,4 +578,4 @@
return DbmSession(req, sid=sid, secret=secret,
timeout=timeout, lock=lock)
-
+
\ No newline at end of file