Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1721

Show
Ignore:
Timestamp:
09/18/07 12:14:06
Author:
fumanchu
Message:

Some updates to the new cherrypy.serving name.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cptools.py

    r1698 r1721  
    211211     
    212212    def _lock_session(self): 
    213         cherrypy._serving.session.acquire_lock() 
     213        cherrypy.serving.session.acquire_lock() 
    214214     
    215215    def _setup(self): 
  • trunk/cherrypy/lib/sessions.py

    r1708 r1721  
    402402    """Save any changed session data.""" 
    403403     
    404     if not hasattr(cherrypy._serving, "session"): 
     404    if not hasattr(cherrypy.serving, "session"): 
    405405        return 
    406406     
     
    424424def close(): 
    425425    """Close the session object for this request.""" 
    426     sess = getattr(cherrypy._serving, "session", None) 
     426    sess = getattr(cherrypy.serving, "session", None) 
    427427    if sess and sess.locked: 
    428428        # If the session is still locked we release the lock 
     
    466466        id = request.cookie[name].value 
    467467     
    468     # Create and attach a new Session instance to cherrypy._serving. 
     468    # Create and attach a new Session instance to cherrypy.serving. 
    469469    # It will possess a reference to (and lock, and lazily load) 
    470470    # the requested session data. 
     
    472472    kwargs['timeout'] = timeout 
    473473    kwargs['clean_freq'] = clean_freq 
    474     cherrypy._serving.session = sess = globals()[storage_class](id, **kwargs) 
    475      
    476     # Create cherrypy.session which will proxy to cherrypy._serving.session 
     474    cherrypy.serving.session = sess = globals()[storage_class](id, **kwargs) 
     475     
     476    # Create cherrypy.session which will proxy to cherrypy.serving.session 
    477477    if not hasattr(cherrypy, "session"): 
    478478        cherrypy.session = cherrypy._ThreadLocalProxy('session') 

Hosted by WebFaction

Log in as guest/cpguest to create tickets