From 91474ab6ca604d3c10843f28ac84efed7b2ab389 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 17 Jun 2024 12:10:40 -0300 Subject: [PATCH] refactor: Raise ImportError with module name in PythonREPLTool --- src/backend/base/langflow/components/tools/PythonREPLTool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/components/tools/PythonREPLTool.py b/src/backend/base/langflow/components/tools/PythonREPLTool.py index f2f3b4b52..914b6b965 100644 --- a/src/backend/base/langflow/components/tools/PythonREPLTool.py +++ b/src/backend/base/langflow/components/tools/PythonREPLTool.py @@ -36,7 +36,7 @@ class PythonREPLToolComponent(CustomComponent): imported_module = importlib.import_module(module) global_dict[imported_module.__name__] = imported_module except ImportError: - print(f"Could not import module {module}") + raise ImportError(f"Could not import module {module}") return global_dict def build(