Skip to content

Commit

Permalink
maybe like this
Browse files Browse the repository at this point in the history
  • Loading branch information
fkiraly committed Oct 3, 2023
1 parent bcb492e commit 10170a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion skbase/lookup/_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,12 @@ def _import_module(
if isinstance(module, str):
imported_mod = importlib.import_module(module)
elif isinstance(module, importlib.machinery.SourceFileLoader):
imported_mod = module.load_module()
spec = importlib.machinery.ModuleSpec(
name=module.name,
loader=module,
origin=module.path,
)
imported_mod = importlib.util.module_from_spec(spec)
exc = None
except Exception as e:
# we store the exception so we can restore the stdout fisrt
Expand Down

0 comments on commit 10170a0

Please sign in to comment.