Skip to content

Commit

Permalink
Don’t error, but remember that we didn’t find the path
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Sep 3, 2024
1 parent 8935f36 commit 7df2f4b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rebench/denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get_denoise_python_path(self):
self._denoise_python_path = path
return path

raise UIError("Could not determine the path to the rebench-denoise package from sys.path:" + str(sys.path), None)
self._denoise_python_path = False

return self._denoise_python_path

Expand Down
10 changes: 8 additions & 2 deletions rebench/denoise_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ def _get_env_with_python_path_for_denoise():


def add_denoise_python_path_to_env(env):
path = paths.get_denoise_python_path()

# did not find it, just leave the env unmodified
if path is False:
return env

env = env.copy()
if 'PYTHONPATH' in env and env['PYTHONPATH']:
env['PYTHONPATH'] += os.pathsep + paths.get_denoise_python_path()
env['PYTHONPATH'] += os.pathsep + path
else:
env['PYTHONPATH'] = paths.get_denoise_python_path()
env['PYTHONPATH'] = path
return env


Expand Down

0 comments on commit 7df2f4b

Please sign in to comment.