zulip_tools: Skip the lock directory.

This is the one special directory that usually lives in deployments/
and is not a deployment.  Make sure we don't treat it as a deployment.
This commit is contained in:
Tim Abbott
2017-09-25 15:11:18 -07:00
parent 500d81bf2c
commit 86a07baf40
2 changed files with 7 additions and 1 deletions

View File

@@ -46,6 +46,9 @@ def get_deployments_to_be_purged(recent_deployments):
if not os.path.isdir(deployment):
# Skip things like uwsgi sockets.
continue
if not os.path.exists(os.path.join(deployment, "zerver")):
# Skip things like "lock" that aren't actually a deployment directory
continue
if deployment not in recent_deployments:
deployments_to_purge.add(deployment)
return deployments_to_purge