diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-10-30 09:17:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-10-30 09:17:59 (GMT) |
commit | 3188f828bb62d9d1881d5129650a5aae92ee29dc (patch) | |
tree | 032bd0f715f0c0a786416d4617df7d152553e991 /Python/traceback.c | |
parent | 51a43703afa0f4de9c2fb2ff4ce3a75e499c5e4e (diff) | |
parent | 5e78f4daa8d4d6b2813401fbb6846929941e9a57 (diff) | |
download | cpython-3188f828bb62d9d1881d5129650a5aae92ee29dc.zip cpython-3188f828bb62d9d1881d5129650a5aae92ee29dc.tar.gz cpython-3188f828bb62d9d1881d5129650a5aae92ee29dc.tar.bz2 |
(Merge 3.4) Issue #22762: Fix _Py_DisplaySourceLine(), clear the exception if
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index 4316f66..e3adc96 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -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; } |