mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Issue #6543: Write the traceback in the terminal encoding instead of utf-8.
Fix the encoding of the modules filename. Reindent also traceback.h, just because I hate tabs :-)
This commit is contained in:
parent
870f09a7f4
commit
0fe25a445d
6 changed files with 70 additions and 57 deletions
|
@ -282,8 +282,7 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyObject
|
|||
PyFile_WriteString("\n", f_stderr);
|
||||
}
|
||||
else
|
||||
if (_Py_DisplaySourceLine(f_stderr, _PyUnicode_AsString(filename),
|
||||
lineno, 2) < 0)
|
||||
if (_Py_DisplaySourceLine(f_stderr, filename, lineno, 2) < 0)
|
||||
return;
|
||||
PyErr_Clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue