Kaydet (Commit) f8d59d28 authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Patch #828384: Don't discard nested exception in AddObject.

üst 7883dc8a
...@@ -520,8 +520,9 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o) ...@@ -520,8 +520,9 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
return -1; return -1;
} }
if (!o) { if (!o) {
PyErr_SetString(PyExc_TypeError, if (!PyErr_Occurred())
"PyModule_AddObject() needs non-NULL value"); PyErr_SetString(PyExc_TypeError,
"PyModule_AddObject() needs non-NULL value");
return -1; return -1;
} }
......
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