summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-02-06 22:35:46 (GMT)
committerGuido van Rossum <guido@python.org>1998-02-06 22:35:46 (GMT)
commit07e9fbf6b96f6bfab45c3ce860f0c1e27671b59b (patch)
treeef6d39c27a7e190727736d30f1af7bc66c67ddc4 /Modules/_tkinter.c
parent40769dd073bdc9c3ceb8082bd080158772e715ec (diff)
downloadcpython-07e9fbf6b96f6bfab45c3ce860f0c1e27671b59b.zip
cpython-07e9fbf6b96f6bfab45c3ce860f0c1e27671b59b.tar.gz
cpython-07e9fbf6b96f6bfab45c3ce860f0c1e27671b59b.tar.bz2
Register Tcl_Finalize as a Python exit handler.
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 5958716..8d654a1 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.