clean-venv-cache: Avoid cleaning production venvs.

This commit is contained in:
Tim Abbott 2016-06-27 20:08:45 -07:00
parent 707df7b55b
commit 7d5c1864f7
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ if "--travis" in sys.argv:
used_caches = set()
for d in glob.glob('/srv/zulip-*venv'):
used_caches.add(os.path.dirname(os.readlink(d)))
for d in ['/root/zulip/zulip-venv']:
if not os.path.exists(d):
continue
used_caches.add(os.path.dirname(os.readlink(d)))
for cache_dir_base in os.listdir(VENV_CACHE_DIR):
cache_dir = os.path.join(VENV_CACHE_DIR, cache_dir_base)