Mercurial > cpython-lru_cache-weakref
diff Python/modsupport.c @ 30771:a6879d1733d7 legacy-trunk
Patch #828384: Don't discard nested exception in AddObject.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Fri, 24 Oct 2003 20:05:32 +0000 |
| parents | 60ce73ea9c92 |
| children | b6c139544c16 |
line wrap: on
line diff
--- a/Python/modsupport.c Fri Oct 24 18:26:26 2003 +0000 +++ b/Python/modsupport.c Fri Oct 24 20:05:32 2003 +0000 @@ -520,8 +520,9 @@ 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; }
