Skip to content

Commit 9f2f946

Browse files
bpo-28994: Fixed errors handling in atexit._run_exitfuncs().
1 parent 1efbf92 commit 9f2f946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/atexitmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ atexit_callfuncs(void)
9797
Py_XDECREF(exc_tb);
9898
}
9999
PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
100-
if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
100+
if (!PyErr_GivenExceptionMatches(exc_type, PyExc_SystemExit)) {
101101
PySys_WriteStderr("Error in atexit._run_exitfuncs:\n");
102102
PyErr_NormalizeException(&exc_type, &exc_value, &exc_tb);
103103
PyErr_Display(exc_type, exc_value, exc_tb);

0 commit comments

Comments
 (0)