Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Don't crash on lack of expiry templates #5077

Merged
merged 1 commit into from Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5077.bugfix
@@ -0,0 +1 @@
Don't crash on lack of expiry templates.
8 changes: 6 additions & 2 deletions synapse/config/emailconfig.py
Expand Up @@ -71,8 +71,12 @@ def read_config(self, config):
self.email_notif_from = email_config["notif_from"]
self.email_notif_template_html = email_config["notif_template_html"]
self.email_notif_template_text = email_config["notif_template_text"]
self.email_expiry_template_html = email_config["expiry_template_html"]
self.email_expiry_template_text = email_config["expiry_template_text"]
self.email_expiry_template_html = email_config.get(
"expiry_template_html", "notice_expiry.html",
)
self.email_expiry_template_text = email_config.get(
"expiry_template_text", "notice_expiry.txt",
)

template_dir = email_config.get("template_dir")
# we need an absolute path, because we change directory after starting (and
Expand Down