Skip to content

Commit

Permalink
Fix issue pointed out by @AI-IshanBhatt
Browse files Browse the repository at this point in the history
Also revert naked `raise` back to `SystemSetupError`.
I'd only done that for debugging purposes
  • Loading branch information
favilo committed Jun 28, 2024
1 parent 672bebd commit 94e7e6f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions esrally/mechanic/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ def __init__(self, root_path, entry_point):
if BootstrapHookHandler(Component(root_path=p, entry_point=Car.entry_point)).can_load():
if p not in root_paths:
root_paths.append(p)
# multiple cars are based on the same hook
# elif root_paths != p:
# raise exceptions.SystemSetupError(f"Invalid car: {name}. Multiple bootstrap hooks are forbidden.")
all_config_base_vars.update(descriptor.config_base_variables)
all_car_vars.update(descriptor.variables)

Expand Down Expand Up @@ -518,8 +515,7 @@ def load(self):
except BaseException:
msg = f"Could not load bootstrap hooks in [{self.loader.root_path}]"
self.logger.exception(msg)
raise
# raise exceptions.SystemSetupError(msg)
raise exceptions.SystemSetupError(msg)

def register(self, phase, hook):
self.logger.info("Registering bootstrap hook [%s] for phase [%s] in component [%s]", hook.__name__, phase, self.component.name)
Expand Down
1 change: 0 additions & 1 deletion esrally/utils/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def load(self) -> Collection[ModuleType]:
component_root_path = os.path.abspath(os.path.join(root_path, os.pardir))
self.logger.debug("Adding [%s] to Python load path.", component_root_path)
# needs to be at the beginning of the system path, otherwise import machinery tries to load application-internal modules
sys.path.insert(0, component_root_path)
try:
root_module = self._load_component(component_name, module_dirs, root_path)
root_modules.append(root_module)
Expand Down

0 comments on commit 94e7e6f

Please sign in to comment.