summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-06-17 23:08:50 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-06-17 23:08:50 +0000
commit86ae93c37f42628dac90832d2194e39afa157539 (patch)
treebb601ce2049f81dd0cffb157a69bf6d0554a9675 /Python/pythonrun.c
parent4b18fc31b450e481513e65d6414f1752bbc90fb0 (diff)
downloadcpython-86ae93c37f42628dac90832d2194e39afa157539.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 5b7cd20251..f45d7dc9fa 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) {