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

Changeset 975

Show
Ignore:
Timestamp:
02/20/06 07:56:00
Author:
rdelon
Message:

Allow programs to quit and return an error code; Small fix in sessionauthenticatefilter

Files:

Legend:

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

    r967 r975  
    105105            try: 
    106106                self.httpserver.start() 
    107             except (KeyboardInterrupt, SystemExit), exc: 
     107            except KeyboardInterrupt, exc: 
    108108                self.interrupt = exc 
    109109                self.stop() 
     110            except SystemExit, exc: 
     111                self.interrupt = exc 
     112                self.stop() 
     113                raise 
    110114        threading.Thread(target=_start_http).start() 
    111115         
  • trunk/cherrypy/filters/sessionauthenticatefilter.py

    r971 r975  
    4646            return 
    4747        elif cherrypy.request.path.endswith('do_logout'): 
    48             login = cherrypy.session[session_key] 
     48            login = cherrypy.session.get('session_key') 
    4949            cherrypy.session[session_key] = None 
    5050            cherrypy.request.user = None 
    5151            cherrypy.thread_data.user = None 
    52             if on_logout: 
     52            if login and on_logout: 
    5353                on_logout(login) 
    5454            from_page = cherrypy.request.params.get('from_page', '..') 

Hosted by WebFaction

Log in as guest/cpguest to create tickets