mirror of
https://github.com/python/cpython.git
synced 2024-11-26 03:14:27 +08:00
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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user