mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08: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:
@@ -1190,7 +1190,7 @@ PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit,
|
||||
d = PyModule_GetDict(m);
|
||||
if (PyDict_GetItemString(d, "__file__") == NULL) {
|
||||
PyObject *f;
|
||||
f = PyUnicode_DecodeFSDefault(filename);
|
||||
f = PyUnicode_FromString(filename);
|
||||
if (f == NULL)
|
||||
return -1;
|
||||
if (PyDict_SetItemString(d, "__file__", f) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user