]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45061: Enhance faulthandler traceback wit no Python frame (GH-28090)
authorVictor Stinner <vstinner@python.org>
Tue, 31 Aug 2021 15:34:29 +0000 (17:34 +0200)
committerGitHub <noreply@github.com>
Tue, 31 Aug 2021 15:34:29 +0000 (17:34 +0200)
Fix indentation of <no Python frame> message in a faulthandler
traceback or a Fatal Python error traceback. Example:

Current thread 0x00007f03896fb740 (most recent call first):
  Garbage-collecting
  <no Python frame>

Python/traceback.c

index 204121ba66d96e2d1332a2419c228a487bfc942a..cdabd2900acf492e902aa9346f63d63d013db9b9 100644 (file)
@@ -1071,7 +1071,7 @@ dump_traceback(int fd, PyThreadState *tstate, int write_header)
 
     frame = tstate->frame;
     if (frame == NULL) {
-        PUTS(fd, "<no Python frame>\n");
+        PUTS(fd, "  <no Python frame>\n");
         return;
     }