refactor: Raise ImportError with module name in PythonREPLTool
This commit is contained in:
parent
b907825b33
commit
91474ab6ca
1 changed files with 1 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue