email-mirror-postfix: Use get_config_bool, instead of checking "true".

This commit is contained in:
Alex Vandiver 2024-03-05 15:59:28 +00:00 committed by Tim Abbott
parent 959e51fe58
commit e0cf82a526
1 changed files with 2 additions and 3 deletions

View File

@ -54,7 +54,7 @@ from urllib.parse import urlencode, urljoin, urlsplit
from urllib.request import Request, urlopen
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()
@ -133,8 +133,7 @@ def send_email_mirror(
if not urlsplit(host).scheme:
config_file = get_config_file()
http_only_config = get_config(config_file, "application_server", "http_only", "")
http_only = http_only_config == "true"
http_only = get_config_bool(config_file, "application_server", "http_only", False)
scheme = "http://" if http_only else "https://"
host = scheme + host