bpo-45061: Enhance faulthandler traceback wit no Python frame (GH-28090)

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 888d4cc06b)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2021-08-31 08:53:17 -07:00 committed by GitHub
parent ab8fed88fc
commit c4c57e5c0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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;
}