comparison Python/pythonrun.c @ 41126:a87bcc37bf0f legacy-trunk

Bug #1678647: write a newline after printing an exception in any case, even when converting the value to a string failed.
author Georg Brandl <georg@python.org>
date Mon, 12 Mar 2007 14:30:05 +0000
parents c8ed4aea6c58
children 45ce388ec59a
comparison
equal deleted inserted replaced
41125:717bc2a4eee7 41126:a87bcc37bf0f
1224 err = PyFile_WriteString(": ", f); 1224 err = PyFile_WriteString(": ", f);
1225 if (err == 0) 1225 if (err == 0)
1226 err = PyFile_WriteObject(s, f, Py_PRINT_RAW); 1226 err = PyFile_WriteObject(s, f, Py_PRINT_RAW);
1227 Py_XDECREF(s); 1227 Py_XDECREF(s);
1228 } 1228 }
1229 if (err == 0) 1229 /* try to write a newline in any case */
1230 err = PyFile_WriteString("\n", f); 1230 err += PyFile_WriteString("\n", f);
1231 } 1231 }
1232 Py_DECREF(value); 1232 Py_DECREF(value);
1233 /* If an error happened here, don't show it. 1233 /* If an error happened here, don't show it.
1234 XXX This is wrong, but too many callers rely on this behavior. */ 1234 XXX This is wrong, but too many callers rely on this behavior. */
1235 if (err != 0) 1235 if (err != 0)