mirror of
https://github.com/python/cpython.git
synced 2026-05-08 05:32:01 -04:00
Interpreter wasn't displaying the location of a SyntaxError
Issue1692
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user