Mercurial > cpython-lru_cache-weakref
comparison Python/traceback.c @ 46589:07a4e1710262 legacy-trunk
Fix a bug introduced by the warnings rewrite where tracebacks were being
improperly indented.
Closes issue #2699.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Mon, 28 Apr 2008 03:23:50 +0000 |
| parents | 840064802952 |
| children | 4fe192d48960 |
comparison
equal
deleted
inserted
replaced
| 46588:d2bb5f131873 | 46589:07a4e1710262 |
|---|---|
| 220 #define FMT " File \"%.500s\", line %d, in %.500s\n" | 220 #define FMT " File \"%.500s\", line %d, in %.500s\n" |
| 221 PyOS_snprintf(linebuf, sizeof(linebuf), FMT, filename, lineno, name); | 221 PyOS_snprintf(linebuf, sizeof(linebuf), FMT, filename, lineno, name); |
| 222 err = PyFile_WriteString(linebuf, f); | 222 err = PyFile_WriteString(linebuf, f); |
| 223 if (err != 0) | 223 if (err != 0) |
| 224 return err; | 224 return err; |
| 225 | |
| 226 err = PyFile_WriteString(" ", f); | |
| 227 return Py_DisplaySourceLine(f, filename, lineno); | 225 return Py_DisplaySourceLine(f, filename, lineno); |
| 228 } | 226 } |
| 229 | 227 |
| 230 static int | 228 static int |
| 231 tb_printinternal(PyTracebackObject *tb, PyObject *f, long limit) | 229 tb_printinternal(PyTracebackObject *tb, PyObject *f, long limit) |
