mirror of https://github.com/zulip/zulip.git
settings: Fix typing for EXTERNAL_HOST.
The previous logic has a reassignment of EXTERNAL_HOST temporarily to Optional[str], which we don't want.
This commit is contained in:
parent
2273608477
commit
05fdbd5224
|
@ -14,8 +14,8 @@ LOCAL_UPLOADS_DIR = os.path.join(DEPLOY_ROOT, 'var/uploads')
|
||||||
|
|
||||||
FORWARD_ADDRESS_CONFIG_FILE = "var/forward_address.ini"
|
FORWARD_ADDRESS_CONFIG_FILE = "var/forward_address.ini"
|
||||||
# Check if test_settings.py set EXTERNAL_HOST.
|
# Check if test_settings.py set EXTERNAL_HOST.
|
||||||
EXTERNAL_HOST = os.getenv('EXTERNAL_HOST')
|
external_host_env = os.getenv('EXTERNAL_HOST')
|
||||||
if EXTERNAL_HOST is None:
|
if external_host_env is None:
|
||||||
user_id = os.getuid()
|
user_id = os.getuid()
|
||||||
user_name = pwd.getpwuid(user_id).pw_name
|
user_name = pwd.getpwuid(user_id).pw_name
|
||||||
if user_name == "zulipdev":
|
if user_name == "zulipdev":
|
||||||
|
@ -31,6 +31,7 @@ if EXTERNAL_HOST is None:
|
||||||
'zulip': 'localhost:9991'
|
'zulip': 'localhost:9991'
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
EXTERNAL_HOST = external_host_env
|
||||||
REALM_HOSTS = {
|
REALM_HOSTS = {
|
||||||
'zulip': EXTERNAL_HOST,
|
'zulip': EXTERNAL_HOST,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue