diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-17 23:08:50 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-17 23:08:50 (GMT) |
commit | 0fe25a445d5e72450a8d611faed75f65ba57c0bc (patch) | |
tree | bb0225a38220360cb4ae5451b68d2c954bf3525d /Python/pythonrun.c | |
parent | 870f09a7f4296712de404dccea1c3a7bf52f66c3 (diff) | |
download | cpython-0fe25a445d5e72450a8d611faed75f65ba57c0bc.zip cpython-0fe25a445d5e72450a8d611faed75f65ba57c0bc.tar.gz cpython-0fe25a445d5e72450a8d611faed75f65ba57c0bc.tar.bz2 |
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 :-)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 5b7cd20..f45d7dc 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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) { |