~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead.py

  • Committer: Michael Hudson
  • Date: 2008-06-19 01:18:01 UTC
  • mto: This revision was merged to the branch mainline in revision 164.
  • Revision ID: michael.hudson@canonical.com-20080619011801-fwnrw5ntwnz7q3cu
testingĀ isĀ grate

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
            environ['SCRIPT_NAME'] = webpath
126
126
            return app(environ, start_response)
127
127
 
128
 
    httpserver.serve(app, host=server_host, port=server_port, threadpool_workers=nworkers)
 
128
    try:
 
129
        httpserver.serve(
 
130
            app, host=server_host, port=server_port,
 
131
            threadpool_workers=nworkers)
 
132
    finally:
 
133
        log.info('Shutdown.')
 
134
        try:
 
135
            os.remove(pidfile)
 
136
        except OSError:
 
137
            pass
129
138
 
130
139
 
131
140
if __name__ == '__main__':