From: Peter H. <pe...@en...> - 2006-02-20 21:31:56
|
Remi Delon wrote: > RE: [cherrypy-users] Re: Patch to fix SystemExit behavior.> Titus wrote: > >>>the code that catches SystemExit in _cpserver.py fails to re-raise it >>>again, thus making it impossible to exit with an error code. >> >>and Remi replied: >> >>>That's fixed now in changeset [975]. Thanks for reporting it. >> >>I think more needs to be done. The lines that Titus was looking at are >>actually now in _cpengine (the "block" method"). Follow-on question: >>should KeyboardInterrupt also re-raise? > > I don't think KeyboardInterrupt should re-raise ... I can't think of a use > case for it. Possibly not, but normally a Python program will generate a traceback if you Ctrl-C out of it without explicitly catching KeyboardInterrupt. Should it be CherryPy's job to change that behaviour? (Sorry I haven't checked the code: I wonder why it's catching that in the first place. Little other non-application code does that... it should probably be up to the programmer to handle.) -Peter |