bpo-31299: make it possible to filter out frames from tracebacks (GH-28067)

This commit is contained in:
Irit Katriel 2021-08-31 21:42:08 +01:00 committed by GitHub
parent 22fe0eb13c
commit 863154c929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 1 deletions

View file

@ -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):