cpython: 2e42c0a39321 (original) (raw)
Mercurial > cpython
changeset 84647:2e42c0a39321
Issue #18408: Fix _Py_DisplaySourceLine() Report _Py_FindSourceFile() error, so the error is cleared; and clear io.open(filename) exception on failure. [#18408]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Tue, 16 Jul 2013 00:32:14 +0200 |
parents | 71a572a516f9 |
children | 92a9ccb2a521 |
files | Python/traceback.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-)[+] [-] Python/traceback.c 4 |
line wrap: on
line diff
--- a/Python/traceback.c +++ b/Python/traceback.c @@ -246,10 +246,12 @@ int binary = _PyObject_CallMethodId(io, &PyId_open, "Os", filename, "rb"); if (binary == NULL) {
PyErr_Clear();[](#l1.7)
+ binary = _Py_FindSourceFile(filename, buf, sizeof(buf), io); if (binary == NULL) { Py_DECREF(io);
return 0;[](#l1.12)