mirror of
https://github.com/python/cpython.git
synced 2025-07-12 22:05:16 +00:00
Interpreter wasn't displaying the location of a SyntaxError
Issue1692
This commit is contained in:
parent
4c3eda3a84
commit
43b15097cc
2 changed files with 3 additions and 1 deletions
|
@ -1103,7 +1103,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename,
|
|||
goto finally;
|
||||
if (v == Py_None)
|
||||
*filename = NULL;
|
||||
else if (! (*filename = PyString_AsString(v)))
|
||||
else if (! (*filename = PyUnicode_AsString(v)))
|
||||
goto finally;
|
||||
|
||||
Py_DECREF(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue