Commit 64149f30 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #19255: Clear error after failed PyDict_SetItem() on shutdown.

This silences a Coverity complain.
parent e0d85834
......@@ -300,7 +300,8 @@ _PyModule_Clear(PyObject *m)
else
PyErr_Clear();
}
PyDict_SetItem(d, key, Py_None);
if (PyDict_SetItem(d, key, Py_None) != 0)
PyErr_Clear();
}
}
}
......@@ -319,7 +320,8 @@ _PyModule_Clear(PyObject *m)
else
PyErr_Clear();
}
PyDict_SetItem(d, key, Py_None);
if (PyDict_SetItem(d, key, Py_None) != 0)
PyErr_Clear();
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment