diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-10-24 20:05:32 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-10-24 20:05:32 (GMT) |
commit | f8d59d28e0867c82b647d94c0aecd9e1c3accd9e (patch) | |
tree | b08d6446556517aa822914216f2f3691c3dffaab /Python | |
parent | 7883dc8abb81026fb111b2fde09ba602ccf04226 (diff) | |
download | cpython-f8d59d28e0867c82b647d94c0aecd9e1c3accd9e.zip cpython-f8d59d28e0867c82b647d94c0aecd9e1c3accd9e.tar.gz cpython-f8d59d28e0867c82b647d94c0aecd9e1c3accd9e.tar.bz2 |
Patch #828384: Don't discard nested exception in AddObject.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/modsupport.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c index b4640b0..ec85511 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -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; } |