Return a response AND THEN raise systemexit

1 view
Skip to first unread message

Malcolm

unread,
Dec 11, 2009, 9:08:04 AM12/11/09
to cherrypy-users
Is there a way to return a response AND THEN raise systemexit(0)?

When we detect a request to shutdown our web server, we would like to
send a confirmation response to the user - and then exit the web
server.

Thank you,
Malcolm

Malcolm

unread,
Dec 13, 2009, 8:11:37 PM12/13/09
to cherrypy-users
Here's the exact solution I was looking for - very elegant:
http://code.activestate.com/recipes/442481/

Regards,
Malcolm
Reply all
Reply to author
Forward
0 new messages