atexit.register in case of errors
andrea.crotti.0 at gmail.com
Wed Feb 15 08:12:06 EST 2012
I have the following very simplified situation
from atexit import register
var = raw_input("read something")
if __name__ == '__main__':
But in my case the "goodbye" function is deleting the logging file which
during the application execution.
Now the problem is that it *always* executes, even when the applications
some bad errors.
Is there a way to have an exit hook, which doesn't execute in case of
I've seen the code of atexit and it apparently doesn't know anything
about the current
status and why the application is actually quitting, is that correct?
More information about the Python-list