]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
It seems obvious that when Py_Finalize() decides that there's nothing
authorGuido van Rossum <guido@python.org>
Mon, 19 Jan 1998 22:00:38 +0000 (22:00 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 19 Jan 1998 22:00:38 +0000 (22:00 +0000)
to do, it should not call sys.exitfunc either...

Python/pythonrun.c

index e57428191885736d773b79207ba4b0666d9fe2a4..100786064263c4be1e861a3e76a72411a6dd7baf 100644 (file)
@@ -179,12 +179,12 @@ Py_Finalize()
        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;