Python 3.3+faulthandlerfunction
faulthandler.disable()
fault handler state
Disables the fault handler by removing the signal handlers installed by enable().
Syntax
faulthandler.disable()
Call it before closing the file you passed to enable(): the handler keeps the descriptor number, and once closed that number may go to another file — the crash traceback will land there. It does not touch the dump_traceback_later() timer or register() signals; those are cancelled separately. It returns None.
Examples
import faulthandler
with open('crash.log', 'w') as log:
faulthandler.enable(file=log)
faulthandler.disable()
print(faulthandler.is_enabled()) # → False
See also
Open in the full glossarydocs.python.orgReport an inaccuracy