summaryrefslogtreecommitdiff
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-07-11 21:45:06 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-07-11 21:45:06 +0000
commit2252d11c08643279ffe58e99f6c8d04014079a7f (patch)
tree1561d7ccea92517daac9b7d5877426b17f15b107 /Python/_warnings.c
parentae6d2b917520f441eb8538466c0b848047dd58f2 (diff)
downloadcpython-git-2252d11c08643279ffe58e99f6c8d04014079a7f.tar.gz
#3342: In tracebacks, printed source lines were not indented since r62555.
#3343: Py_DisplaySourceLine should be a private function. Rename it to _Py_DisplaySourceLine.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r--Python/_warnings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 07b98efb2b..5ed8b55b9f 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -256,7 +256,6 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyObject
Py_XDECREF(name);
/* Print " source_line\n" */
- PyFile_WriteString(" ", f_stderr);
if (sourceline) {
char *source_line_str = PyString_AS_STRING(sourceline);
while (*source_line_str == ' ' || *source_line_str == '\t' ||
@@ -267,7 +266,8 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyObject
PyFile_WriteString("\n", f_stderr);
}
else
- Py_DisplaySourceLine(f_stderr, PyString_AS_STRING(filename), lineno);
+ _Py_DisplaySourceLine(f_stderr, PyString_AS_STRING(filename),
+ lineno, 2);
PyErr_Clear();
}