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

This commit is contained in:
Martin v. Löwis 2003-10-24 20:05:32 +00:00
parent 7883dc8abb
commit f8d59d28e0

View File

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