Re: Setting the exit status from sys.excepthook

2016-11-21 Thread Peter Otten
Steven D'Aprano wrote: > I have script with an exception handler that takes care of writing the > traceback to syslog, and I set it as the global exceptionhook: > > sys.excepthook = my_error_handler > > > When my script raises, my_error_handler is called, as expected, and the > process exits wi

Setting the exit status from sys.excepthook

2016-11-21 Thread Steven D'Aprano
I have script with an exception handler that takes care of writing the traceback to syslog, and I set it as the global exceptionhook: sys.excepthook = my_error_handler When my script raises, my_error_handler is called, as expected, and the process exits with status 1. How can I change the exi