cpython: 573f7d485ce8 (original) (raw)
Mercurial > cpython
changeset 84694:573f7d485ce8
Issue #18408: Fix PyErr_SetImportError(), handle PyDict_SetItemString() failure [#18408]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Wed, 17 Jul 2013 21:54:25 +0200 |
parents | 479af6ca3a3c |
children | 97bb3bdf1443 |
files | Python/errors.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-)[+] [-] Python/errors.c 7 |
line wrap: on
line diff
--- a/Python/errors.c +++ b/Python/errors.c @@ -655,8 +655,11 @@ PyErr_SetImportError(PyObject *msg, PyOb Py_INCREF(msg); PyTuple_SET_ITEM(args, 0, msg);
- if (PyDict_SetItemString(kwargs, "name", name) < 0)
return NULL;[](#l1.11)
- if (PyDict_SetItemString(kwargs, "path", path) < 0)
return NULL;[](#l1.13)
error = PyObject_Call(PyExc_ImportError, args, kwargs); if (error != NULL) {