upgrade-zulip: Only remove zproject/local_settings.py if symlink.

This fixes a problem where if we're deploying from git,
local_settings.py ends up part of the diff in the deployed git
repository.
This commit is contained in:
Tim Abbott
2016-10-04 20:40:17 -07:00
parent 7df50cee34
commit a2b91221d0

View File

@@ -48,7 +48,7 @@ if not os.path.exists((os.path.join(deploy_path, "zproject/prod_settings"))):
os.path.join(deploy_path, "zproject/prod_settings.py")])
# delete local_settings.py symlink if it exists, as it is now prod_settings.py
if os.path.exists((os.path.join(deploy_path, "zproject/local_settings.py"))):
if os.path.islink((os.path.join(deploy_path, "zproject/local_settings.py"))):
subprocess.check_call(["rm", os.path.join(deploy_path, "zproject/local_settings.py")])
subprocess.check_call([os.path.join(deploy_path, "scripts", "lib", "create-production-venv"),