mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-24 18:05:07 +00:00
fix(services): register modules in sys.modules so repo-cloned services can self-import and remove old benchmark that should have been deleted
This commit is contained in:
@@ -111,6 +111,7 @@ def import_module_by_path(path: Path) -> ModuleType:
|
||||
|
||||
spec = importlib.util.spec_from_file_location(name, path)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
sys.modules[name] = module
|
||||
spec.loader.exec_module(module)
|
||||
|
||||
return module
|
||||
|
||||
Reference in New Issue
Block a user