Issue #22762: Fix _Py_DisplaySourceLine(), clear the exception if
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
This commit is contained in:
parent
2acbae8016
commit
5e78f4daa8
|
@ -322,6 +322,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent)
|
|||
Py_XDECREF(lineobj);
|
||||
lineobj = PyFile_GetLine(fob, -1);
|
||||
if (!lineobj) {
|
||||
PyErr_Clear();
|
||||
err = -1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue