(Merge 3.4) Issue #22762: Fix _Py_DisplaySourceLine(), clear the exception if
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
This commit is contained in:
commit
3188f828bb
|
@ -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