Skip to content

Commit 2a55a59

Browse files
committed
Fixing bool parse
1 parent 057714d commit 2a55a59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config.env.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Default configuration settings and environment variable based configuration logic
33
See the readme for more information
44
"""
5-
5+
from distutils.util import strtobool
66
from os import environ
77

88
# Flask config
@@ -32,11 +32,11 @@
3232
LDAP_BIND_PASS = environ.get("PACKET_LDAP_BIND_PASS", None)
3333

3434
# Mail Config
35-
MAIL_PROD = environ.get("PACKET_MAIL_PROD", False)
35+
MAIL_PROD = strtobool(environ.get("PACKET_MAIL_PROD", 'False'))
3636
MAIL_SERVER = environ.get("PACKET_MAIL_SERVER", "thoth.csh.rit.edu")
3737
MAIL_USERNAME = environ.get("PACKET_MAIL_USERNAME", "[email protected]")
3838
MAIL_PASSWORD = environ.get("PACKET_MAIL_PASSWORD", None)
39-
MAIL_USE_TLS = environ.get("PACKET_MAIL_TLS", True)
39+
MAIL_USE_TLS = strtobool(environ.get("PACKET_MAIL_TLS", 'True'))
4040

4141
# Slack URL for pushing to #general
4242
SLACK_WEBHOOK_URL = environ.get("PACKET_SLACK_URL", None)

0 commit comments

Comments
 (0)