diff Modules/_tkinter.c @ 7212:b9bbfa169920 legacy-trunk

Register Tcl_Finalize as a Python exit handler.
author Guido van Rossum <guido@python.org>
date Fri, 06 Feb 1998 22:35:46 +0000
parents 297a541eb865
children 13f29b62a209
line wrap: on
line diff
--- a/Modules/_tkinter.c	Fri Feb 06 22:32:08 1998 +0000
+++ b/Modules/_tkinter.c	Fri Feb 06 22:35:46 1998 +0000
@@ -1543,7 +1543,10 @@
 	}
 
 	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.