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

This silences a Coverity complain.
This commit is contained in:
Serhiy Storchaka 2014-02-12 09:55:45 +02:00
commit 226c57100c

View File

@ -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();
}
}
}