diff options
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 2f2bd36..72978ae 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -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(); } } } |