mirror of
https://github.com/python/cpython.git
synced 2025-07-27 13:14:41 +00:00
Fix #1494605.
This commit is contained in:
parent
bda0744d55
commit
a1121fa935
1 changed files with 2 additions and 1 deletions
|
@ -728,7 +728,8 @@ PyErr_SyntaxLocation(const char *filename, int lineno)
|
|||
|
||||
tmp = PyErr_ProgramText(filename, lineno);
|
||||
if (tmp) {
|
||||
PyObject_SetAttrString(v, "text", tmp);
|
||||
if (PyObject_SetAttrString(v, "text", tmp))
|
||||
PyErr_Clear();
|
||||
Py_DECREF(tmp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue