summaryrefslogtreecommitdiff
path: root/Python/_warnings.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/_warnings.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/_warnings.c')
-rw-r--r--Python/_warnings.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index b1b2b71b8d..55f7fda94f 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -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();
}