diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2021-08-31 20:42:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-31 20:42:08 (GMT) |
commit | 863154c9292e70c5a8a1a3f22ef4ee42e2304281 (patch) | |
tree | 494d7e167c6d21600a6db95642af773a1e4eeb46 /Lib/traceback.py | |
parent | 22fe0eb13c3441b71b60aaea0e7fe289a29783da (diff) | |
download | cpython-863154c9292e70c5a8a1a3f22ef4ee42e2304281.zip cpython-863154c9292e70c5a8a1a3f22ef4ee42e2304281.tar.gz cpython-863154c9292e70c5a8a1a3f22ef4ee42e2304281.tar.bz2 |
bpo-31299: make it possible to filter out frames from tracebacks (GH-28067)
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py index 4ad8c9a..8d83fd9 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -515,6 +515,9 @@ class StackSummary(list): last_name = None count = 0 for frame in self: + formatted_frame = self.format_frame(frame) + if formatted_frame is None: + continue if (last_file is None or last_file != frame.filename or last_line is None or last_line != frame.lineno or last_name is None or last_name != frame.name): |