From 0fe25a445d5e72450a8d611faed75f65ba57c0bc Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 17 Jun 2010 23:08:50 +0000 Subject: 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 :-) --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 5b7cd202513..f45d7dc9fa9 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) { -- cgit v1.2.3