1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Include a traceback for non-strict event loop blocking detection (#118620)

This commit is contained in:
J. Nick Koston
2024-06-02 05:36:25 -05:00
committed by GitHub
parent e976db8443
commit 8f94205014
6 changed files with 30 additions and 14 deletions

View File

@@ -1689,8 +1689,10 @@ def help_test_all(module: ModuleType) -> None:
def extract_stack_to_frame(extract_stack: list[Mock]) -> FrameType:
"""Convert an extract stack to a frame list."""
stack = list(extract_stack)
_globals = globals()
for frame in stack:
frame.f_back = None
frame.f_globals = _globals
frame.f_code.co_filename = frame.filename
frame.f_lineno = int(frame.lineno)