Changeset 1454
- Timestamp:
- 11/28/06 16:25:43
- Files:
-
- trunk/cherrypy/lib/sessions.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/sessions.py
r1452 r1454 228 228 LOCK_SUFFIX = '.lock' 229 229 230 def __init__(self, id=None, **kwargs): 231 Session.__init__(self, id, **kwargs) 232 230 def setup(self): 233 231 # Warn if any lock files exist at startup. 234 232 lockfiles = [fname for fname in os.listdir(self.storage_path) … … 427 425 id = request.cookie[name].value 428 426 429 if not hasattr(cherrypy, "session"):430 cherrypy.session = cherrypy._ThreadLocalProxy('session', _def_session)431 432 427 # Create and attach a new Session instance to cherrypy._serving. 433 428 # It will possess a reference to (and lock, and lazily load) … … 437 432 kwargs['clean_freq'] = clean_freq 438 433 cherrypy._serving.session = sess = globals()[storage_class](id, **kwargs) 434 435 if not hasattr(cherrypy, "session"): 436 cherrypy.session = cherrypy._ThreadLocalProxy('session', _def_session) 437 if hasattr(sess, "setup"): 438 sess.setup() 439 439 440 440 if locking == 'implicit':

