Delete tkinter._ExceptionReportingCallback (#10689)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Akuli
2023-09-12 20:16:47 +03:00
committed by GitHub
parent c31e12fff1
commit fbd7963fd6
2 changed files with 16 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
from __future__ import annotations
import tkinter
import traceback
import types
def custom_handler(exc: type[BaseException], val: BaseException, tb: types.TracebackType | None) -> None:
print("oh no")
root = tkinter.Tk()
root.report_callback_exception = traceback.print_exception
root.report_callback_exception = custom_handler