Skip to content

Commit

Permalink
resultspace: Fixing environment cache checking which could blow away …
Browse files Browse the repository at this point in the history
…environment if there are no env hooks in the resultspace (fixes #350)
  • Loading branch information
jbohren committed Apr 21, 2016
1 parent 262e83a commit 6585679
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions catkin_tools/resultspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ def get_resultspace_environment(result_space_path, base_env={}, quiet=False, cac
env_hooks = []

# Check the cache first, if desired
if cached:
cached_env_hooks = _resultspace_env_hooks_cache.get(result_space_path, [])
if result_space_path in _resultspace_env_cache and env_hooks == cached_env_hooks:
if cached and result_space_path in _resultspace_env_hooks_cache and result_space_path in _resultspace_env_cache:
if env_hooks == _resultspace_env_hooks_cache.get(result_space_path):
return dict(_resultspace_env_cache[result_space_path])

# Check to make sure result_space_path is a valid directory
Expand Down

0 comments on commit 6585679

Please sign in to comment.