From 60b5615282b9f1c6d153f9e979d0f16619399abe Mon Sep 17 00:00:00 2001 From: Caleb Brown Date: Fri, 15 May 2026 15:55:51 +1000 Subject: [PATCH] Ensure execute the python execute phase works correctly. Signed-off-by: Caleb Brown --- sandboxes/dynamicanalysis/analyze-python.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sandboxes/dynamicanalysis/analyze-python.py b/sandboxes/dynamicanalysis/analyze-python.py index 7be7851d..39b3102a 100644 --- a/sandboxes/dynamicanalysis/analyze-python.py +++ b/sandboxes/dynamicanalysis/analyze-python.py @@ -103,9 +103,13 @@ def import_module(import_path): def execute_package(package): """Execute phase for analyzing the package.""" for p in module_paths_to_import(package): - # if we're here, importing should have already worked during import phase - module = importlib.import_module(p) - execute_module(module) + try: + module = importlib.import_module(p) + except BaseException: + # We reach here when import fails. So skip this package. + continue + else: + execute_module(module) def execute_module(module):