FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue #22762: Fix _Py_DisplaySourceLine(), clear the exception if · python-emscripten/cpython@5e78f4d · GitHub

Repository navigation

Commit 5e78f4d

Browse files
committed
Issue python#22762: Fix _Py_DisplaySourceLine(), clear the exception if
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
1 parent 2acbae8 commit 5e78f4d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎Python/traceback.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent)
322322
Py_XDECREF(lineobj);
323323
lineobj = PyFile_GetLine(fob, -1);
324324
if (!lineobj) {
325+
PyErr_Clear();
325326
err = -1;
326327
break;
327328
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL