Skip to content

Commit

Permalink
Add sys.path.insert back
Browse files Browse the repository at this point in the history
It is the fastest way to get this working without writing my own
Importer
  • Loading branch information
favilo committed Jun 28, 2024
1 parent 00ea137 commit e353835
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions esrally/utils/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ 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 e353835

Please sign in to comment.