Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Modify check for smtp settings to be kinder to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 committed Jun 5, 2019
1 parent 177f024 commit 6d2d3c9
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions synapse/config/emailconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,14 @@ def read_config(self, config):
bleach

if not self.email_enable_password_reset_from_is:
required = [
"smtp_host",
"smtp_port",
"notif_from",
]

missing = []
for k in required:
if k not in email_config:
missing.append(k)

if (len(missing) > 0):
if (not self.email_smtp_host
or not self.email_smtp_port
or not self.email_notif_from
):
raise RuntimeError(
"email.enable_password_reset_from_is is False "
"but required keys are missing: %s" %
(", ".join(["email." + k for k in missing]),)
"but not all of the following are set: "
"email.smtp_host, email.smtp_port, email_notif_from"
)

# Templates for password reset emails
Expand Down

0 comments on commit 6d2d3c9

Please sign in to comment.