Skip to content

Commit 5b0eb4f

Browse files
committed
Use environ.get for optional env vars.
1 parent 85977b6 commit 5b0eb4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pythonkc_site/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@
163163
EMAIL_HOST = "smtp.gmail.com"
164164
EMAIL_PORT = 587
165165
EMAIL_USE_TLS = True
166-
EMAIL_HOST_USER = os.environ["EMAIL_HOST_USER"]
167-
EMAIL_HOST_PASSWORD = os.environ["EMAIL_HOST_PASSWORD"]
166+
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
167+
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
168168
MEETUP_API_KEY = os.environ["MEETUP_API_KEY"]
169169

170170
try:
@@ -174,7 +174,7 @@
174174

175175

176176
try:
177-
# NOTE The GONDOR_REDIS_* settings are placed in local_settings by the
177+
# NOTE The GONDOR_REDIS_* settings are placed in local_settings by the
178178
# Gondor runtime.
179179
CACHES = {
180180
'default': {

0 commit comments

Comments
 (0)