Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4cc462e

Browse files
committed
It seems obvious that when Py_Finalize() decides that there's nothing
to do, it should not call sys.exitfunc either...
1 parent d2dd9a8 commit 4cc462e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/pythonrun.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ Py_Finalize()
179179
PyInterpreterState *interp;
180180
PyThreadState *tstate;
181181

182-
call_sys_exitfunc();
183-
184182
if (!initialized)
185183
return;
186184
initialized = 0;
187185

186+
call_sys_exitfunc();
187+
188188
/* Get current thread state and interpreter pointer */
189189
tstate = PyThreadState_Get();
190190
interp = tstate->interp;

0 commit comments

Comments
 (0)