From 00ea137795c114e14555ecd4c173dd02911c4781 Mon Sep 17 00:00:00 2001 From: favilo Date: Fri, 28 Jun 2024 11:25:48 -0700 Subject: [PATCH] Fix mypy `type-arg` error I introduced --- esrally/utils/modules.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esrally/utils/modules.py b/esrally/utils/modules.py index a6bf537ee..0fa2b45a8 100644 --- a/esrally/utils/modules.py +++ b/esrally/utils/modules.py @@ -67,6 +67,8 @@ def _load_component(self, component_name: str, module_dirs: Collection[str], roo for name, p in self._modules(module_dirs, component_name, root_path): self.logger.debug("Loading module [%s]: %s", name, p) spec = importlib.util.spec_from_file_location(name, p) + if spec is None: + raise exceptions.SystemSetupError(f"Could not load module [{name}]") m = importlib.util.module_from_spec(spec) spec.loader.exec_module(m) if name == root_module_name: