mirror of https://github.com/zulip/zulip.git
email-mirror-postfix: Use get_config_bool, instead of checking "true".
This commit is contained in:
parent
959e51fe58
commit
e0cf82a526
|
@ -54,7 +54,7 @@ from urllib.parse import urlencode, urljoin, urlsplit
|
||||||
from urllib.request import Request, urlopen
|
from urllib.request import Request, urlopen
|
||||||
|
|
||||||
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
|
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
|
||||||
from scripts.lib.zulip_tools import get_config, get_config_file
|
from scripts.lib.zulip_tools import get_config_bool, get_config_file
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
@ -133,8 +133,7 @@ def send_email_mirror(
|
||||||
|
|
||||||
if not urlsplit(host).scheme:
|
if not urlsplit(host).scheme:
|
||||||
config_file = get_config_file()
|
config_file = get_config_file()
|
||||||
http_only_config = get_config(config_file, "application_server", "http_only", "")
|
http_only = get_config_bool(config_file, "application_server", "http_only", False)
|
||||||
http_only = http_only_config == "true"
|
|
||||||
scheme = "http://" if http_only else "https://"
|
scheme = "http://" if http_only else "https://"
|
||||||
host = scheme + host
|
host = scheme + host
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue