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

Changeset 1813

Show
Ignore:
Timestamp:
10/30/07 12:48:41
Author:
lakin
Message:

Allowing SystemExit?, and KeyboardInterrupt? exceptions through during wspbus.start() without calling stop. (Allows daemonization to function properly). Also log any exceptions which cause start to fail.

Files:

Legend:

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

    r1810 r1813  
    152152        try: 
    153153            self.publish('start') 
     154        except (KeyboardInterrupt, SystemExit): 
     155            raise 
    154156        except: 
     157            start_trace =  _traceback.format_exc() 
     158            e_info = sys.exc_info() 
    155159            try: 
    156160                self.stop() 
     
    158162                # Any stop errors will be logged inside publish(). 
    159163                pass 
    160             raise 
     164            self.log("Exception that caused shutdown: %s" % start_trace) 
     165            raise e_info[0], e_info[1], e_info[2] 
     166 
    161167        self.state = states.STARTED 
    162168     

Hosted by WebFaction

Log in as guest/cpguest to create tickets