From 7d5c1864f784eefe08b69d86cdbd972120a0cfcf Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 27 Jun 2016 20:08:45 -0700 Subject: [PATCH] clean-venv-cache: Avoid cleaning production venvs. --- tools/clean-venv-cache | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/clean-venv-cache b/tools/clean-venv-cache index 2396b23ac7..f6f854d961 100755 --- a/tools/clean-venv-cache +++ b/tools/clean-venv-cache @@ -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)