diff Python/pythonrun.c @ 7113:f5f305d7a617 legacy-trunk

It seems obvious that when Py_Finalize() decides that there's nothing to do, it should not call sys.exitfunc either...
author Guido van Rossum <guido@python.org>
date Mon, 19 Jan 1998 22:00:38 +0000
parents bc007cf1d6ba
children 3f255aedf621
line wrap: on
line diff
--- a/Python/pythonrun.c	Mon Jan 19 21:59:48 1998 +0000
+++ b/Python/pythonrun.c	Mon Jan 19 22:00:38 1998 +0000
@@ -179,12 +179,12 @@
 	PyInterpreterState *interp;
 	PyThreadState *tstate;
 
-	call_sys_exitfunc();
-
 	if (!initialized)
 		return;
 	initialized = 0;
 
+	call_sys_exitfunc();
+
 	/* Get current thread state and interpreter pointer */
 	tstate = PyThreadState_Get();
 	interp = tstate->interp;