MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / extract_traceback_frames

Function extract_traceback_frames

py/conftest.py:66–75  ·  view source on GitHub ↗

Extract frames from a traceback object.

(tb)

Source from the content-addressed store, hash-verified

64
65
66def extract_traceback_frames(tb):
67 """Extract frames from a traceback object."""
68 frames = []
69 while tb:
70 if hasattr(tb, "tb_frame") and hasattr(tb, "tb_lineno"):
71 # Skip frames without source files
72 if Path(tb.tb_frame.f_code.co_filename).exists():
73 frames.append((tb.tb_frame, tb.tb_lineno, getattr(tb, "tb_lasti", 0)))
74 tb = getattr(tb, "tb_next", None)
75 return frames
76
77
78def filter_frames(frames):

Callers 1

Calls 2

existsMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected