dev_settings: Fix run-dev SyntaxError.

zthumbor loads dev_settings from Python 2.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-04-24 20:07:50 -07:00
parent 01a57ddd9d
commit b46d1c8d07
1 changed files with 3 additions and 8 deletions

View File

@ -12,14 +12,9 @@ from typing import Set
DEPLOY_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
LOCAL_UPLOADS_DIR = os.path.join(DEPLOY_ROOT, 'var/uploads')
def is_dev_droplet() -> bool:
# We assume dev droplets are the only places where
# users use zulipdev as the user.
user_id = os.getuid()
user_name = pwd.getpwuid(user_id).pw_name
return user_name == 'zulipdev'
IS_DEV_DROPLET = is_dev_droplet()
# We assume dev droplets are the only places where
# users use zulipdev as the user.
IS_DEV_DROPLET = pwd.getpwuid(os.getuid()).pw_name == 'zulipdev'
FORWARD_ADDRESS_CONFIG_FILE = "var/forward_address.ini"
# Check if test_settings.py set EXTERNAL_HOST.