Miroslav Matějů added the comment:
I completely support @gwk’s opinion expressed in his comments. My original
intention has been to set the exit code in an atexit callback. I tried a way
and found that it was working in Python 2.7 but not in 3.x (without notice), so
I filed this bug report
New submission from Miroslav Matějů:
I want to set exit code of my script in a function registered in the atexit
module. (See https://stackoverflow.com/q/37178636/711006.) Calling sys.exit()
in that function results in the following error:
Error in atexit._run_exitfuncs:
Traceback (most