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

Changeset 1756

Show
Ignore:
Timestamp:
10/18/07 17:16:37
Author:
fumanchu
Message:

Final fixes to test_states.

Files:

Legend:

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

    r1752 r1756  
    190190class _TimeoutMonitor(restsrv.plugins.Monitor): 
    191191     
    192     def __init__(self, engine): 
     192    def __init__(self, bus): 
    193193        self.servings = [] 
    194         restsrv.plugins.Monitor.__init__(self, engine, self.run) 
     194        restsrv.plugins.Monitor.__init__(self, bus, self.run) 
    195195     
    196196    def acquire(self): 
     
    208208            resp.check_timeout() 
    209209timeout_monitor = _TimeoutMonitor(engine) 
     210timeout_monitor.subscribe() 
    210211 
    211212# Add an autoreloader (the 'engine' config namespace may detach/attach it). 
    212213engine.autoreload = restsrv.plugins.Autoreloader(engine) 
     214engine.autoreload.subscribe() 
    213215restsrv.plugins.Reexec(engine).subscribe() 
    214216restsrv.plugins.ThreadManager(engine).subscribe() 
  • trunk/cherrypy/test/test_states_demo.py

    r1755 r1756  
    3232    stop.exposed = True 
    3333 
     34 
    3435if __name__ == '__main__': 
    3536    conf = {"server.socket_host": sys.argv[1], 
     
    4344        conf['server.ssl_certificate'] = serverpem 
    4445        conf['server.ssl_private_key'] = serverpem 
    45  
     46     
    4647    if '-daemonize' in sys.argv[3:]: 
    47         # Sometimes an exception happens during exit, try to make sure we get   
    48         # a non_zero exit code. 
     48        # Sometimes an exception happens during exit; 
     49        # try to make sure we get a non_zero exit code. 
    4950        old_exitfunc = sys.exitfunc 
    5051        def exitfunc(): 
     
    6061        plugins.PIDFile(cherrypy.engine, PID_file_path).subscribe() 
    6162     
    62     cherrypy.engine.subscribe('start', cherrypy.server.quickstart)    
     63    cherrypy.engine.subscribe('start', cherrypy.server.quickstart) 
    6364     
    6465    # This is in a special order for a reason: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets