diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-07-15 15:32:09 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-07-15 15:32:09 (GMT) |
commit | e65282114e96efb9e7eee77c57244943b746f6fe (patch) | |
tree | 9daa571b35e287058d54b39bffbc6ca89a843f65 /Python/_warnings.c | |
parent | 9bab65c25928617b2911d2f42d01e5543893ed93 (diff) | |
download | cpython-e65282114e96efb9e7eee77c57244943b746f6fe.zip cpython-e65282114e96efb9e7eee77c57244943b746f6fe.tar.gz cpython-e65282114e96efb9e7eee77c57244943b746f6fe.tar.bz2 |
implement chained exception tracebacks
patch from Antoine Pitrou #3112
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 23223fa..e9384ca 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 = PyUnicode_AsString(sourceline); while (*source_line_str == ' ' || *source_line_str == '\t' || @@ -267,7 +266,7 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyObject PyFile_WriteString("\n", f_stderr); } else - Py_DisplaySourceLine(f_stderr, PyUnicode_AsString(filename), lineno); + Py_DisplaySourceLine(f_stderr, PyUnicode_AsString(filename), lineno, 2); PyErr_Clear(); } |