From: Guido van Rossum Date: Fri, 6 Feb 1998 22:35:46 +0000 (+0000) Subject: Register Tcl_Finalize as a Python exit handler. X-Git-Tag: v1.5.1~842 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07e9fbf6b96f6bfab45c3ce860f0c1e27671b59b;p=thirdparty%2FPython%2Fcpython.git Register Tcl_Finalize as a Python exit handler. --- diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 59587164f2a6..8d654a14b2f5 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -1543,7 +1543,10 @@ init_tkinter() } if (PyErr_Occurred()) - Py_FatalError("can't initialize module _tkinter"); + return; + + Py_AtExit(Tcl_Finalize); + #ifdef macintosh /* ** Part of this code is stolen from MacintoshInit in tkMacAppInit.