]> granicus.if.org Git - python/commitdiff
Register Tcl_Finalize as a Python exit handler.
authorGuido van Rossum <guido@python.org>
Fri, 6 Feb 1998 22:35:46 +0000 (22:35 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 6 Feb 1998 22:35:46 +0000 (22:35 +0000)
Modules/_tkinter.c

index 59587164f2a6e16eb9971ca8dd3980ba4dabedaa..8d654a14b2f5c4b1ba62a82b94c0b64d247aa2e7 100644 (file)
@@ -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.