]> granicus.if.org Git - python/commitdiff
bpo-36389: Add newline to _PyObject_AssertFailed() (GH-16629)
authorVictor Stinner <vstinner@python.org>
Mon, 7 Oct 2019 21:44:05 +0000 (23:44 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Oct 2019 21:44:05 +0000 (23:44 +0200)
Add a newline between the verbose object dump and the Py_FatalError()
logs for readability.

Objects/object.c

index e94480f7e998fbde62db6e4004472c26f11b7ba9..ae76e33e1f4f1fce372d1e8c2e6475b20fc20bce 100644 (file)
@@ -2187,6 +2187,9 @@ _PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
         /* This might succeed or fail, but we're about to abort, so at least
            try to provide any extra info we can: */
         _PyObject_Dump(obj);
+
+        fprintf(stderr, "\n");
+        fflush(stderr);
     }
 
     Py_FatalError("_PyObject_AssertFailed");