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

vstinner webhook-mailer at python.org
Tue Aug 31 11:34:40 EDT 2021


https://github.com/python/cpython/commit/888d4cc06b887e77f281ba4d640e281cb4c61b7b
commit: 888d4cc06b887e77f281ba4d640e281cb4c61b7b
branch: main
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2021-08-31T17:34:29+02:00
summary:

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>

files:
M Python/traceback.c

diff --git a/Python/traceback.c b/Python/traceback.c
index 204121ba66d96e..cdabd2900acf49 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -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;
     }
 



More information about the Python-checkins mailing list