]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45061: Enhance faulthandler traceback wit no Python frame (GH-28090)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 31 Aug 2021 15:53:17 +0000 (08:53 -0700)
committerGitHub <noreply@github.com>
Tue, 31 Aug 2021 15:53:17 +0000 (08:53 -0700)
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>
(cherry picked from commit 888d4cc06b887e77f281ba4d640e281cb4c61b7b)

Co-authored-by: Victor Stinner <vstinner@python.org>
Python/traceback.c

index 88ffc01c6eca3ac22d9388c5f737e7a9d8842774..9b23f45ba5bb8928e56d571da459c19f86224a62 100644 (file)
@@ -801,7 +801,7 @@ dump_traceback(int fd, PyThreadState *tstate, int write_header)
     // not modify Python objects.
     frame = tstate->frame;
     if (frame == NULL) {
-        PUTS(fd, "<no Python frame>\n");
+        PUTS(fd, "  <no Python frame>\n");
         return;
     }