Issue #19255: Clear error after failed PyDict_SetItem() on shutdown.
This silences a Coverity complain.
This commit is contained in:
commit
226c57100c
|
@ -330,7 +330,8 @@ _PyModule_ClearDict(PyObject *d)
|
|||
else
|
||||
PyErr_Clear();
|
||||
}
|
||||
PyDict_SetItem(d, key, Py_None);
|
||||
if (PyDict_SetItem(d, key, Py_None) != 0)
|
||||
PyErr_Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +350,8 @@ _PyModule_ClearDict(PyObject *d)
|
|||
else
|
||||
PyErr_Clear();
|
||||
}
|
||||
PyDict_SetItem(d, key, Py_None);
|
||||
if (PyDict_SetItem(d, key, Py_None) != 0)
|
||||
PyErr_Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue