[elbe-devel] [PATCH 01/11] elbepack: cli: gracefully handle stack entries without module
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu Aug 1 17:52:58 CEST 2024
If a stack entry has no module, skip it to avoid errors.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/cli.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/elbepack/cli.py b/elbepack/cli.py
index 6633305b1bff..4e331da54203 100644
--- a/elbepack/cli.py
+++ b/elbepack/cli.py
@@ -80,6 +80,8 @@ def _last_frame_in_package(tb, package):
while tb.tb_next is not None:
tb = tb.tb_next
mod = inspect.getmodule(tb)
+ if mod is None:
+ continue
name = mod.__spec__.name
if name and (name == package or name.startswith(package + '.')):
frame = tb.tb_frame
--
2.45.2
More information about the elbe-devel
mailing list