provision: Handle VENV_CACHE_PATH not existing.

If VENV_CACHE_PATH does not exist (which can happen if you destroy
your vagrant environment), then do a short circuit return in
try_to_copy_venv().
This commit is contained in:
Steve Howell 2016-09-20 06:55:08 -07:00
parent 59f3fd55c9
commit 13d6f52203
1 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,9 @@ def try_to_copy_venv(venv_path, new_packages):
virtualenv-clone.
3. Delete all .pyc files in the new virtual environment.
"""
if not os.path.exists(VENV_CACHE_PATH):
return False
venv_name = os.path.basename(venv_path)
overlaps = [] # type: List[Tuple[int, str, Set[str]]]