Patch #828384: Don't discard nested exception in AddObject.
This commit is contained in:
parent
7883dc8abb
commit
f8d59d28e0
|
@ -520,8 +520,9 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
|||
return -1;
|
||||
}
|
||||
if (!o) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"PyModule_AddObject() needs non-NULL value");
|
||||
if (!PyErr_Occurred())
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"PyModule_AddObject() needs non-NULL value");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue