Commit 0479917c authored by Georg Brandl's avatar Georg Brandl

Bug #1678647: write a newline after printing an exception in any

case, even when converting the value to a string failed.
parent 151c05b1
...@@ -12,6 +12,9 @@ What's New in Python 2.6 alpha 1? ...@@ -12,6 +12,9 @@ What's New in Python 2.6 alpha 1?
Core and builtins Core and builtins
----------------- -----------------
- Bug #1678647: write a newline after printing an exception in any
case, even when converting the value to a string failed.
- The dir() function has been extended to call the __dir__() method on - The dir() function has been extended to call the __dir__() method on
its argument, if it exists. If not, it will work like before. This allows its argument, if it exists. If not, it will work like before. This allows
customizing the output of dir() in the presence of a __getattr__(). customizing the output of dir() in the presence of a __getattr__().
......
...@@ -1226,8 +1226,8 @@ PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb) ...@@ -1226,8 +1226,8 @@ PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
err = PyFile_WriteObject(s, f, Py_PRINT_RAW); err = PyFile_WriteObject(s, f, Py_PRINT_RAW);
Py_XDECREF(s); Py_XDECREF(s);
} }
if (err == 0) /* try to write a newline in any case */
err = PyFile_WriteString("\n", f); err += PyFile_WriteString("\n", f);
} }
Py_DECREF(value); Py_DECREF(value);
/* If an error happened here, don't show it. /* If an error happened here, don't show it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment