summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-29 14:27:40 +0100
committerDavid Baker <dave@matrix.org>2016-04-29 14:27:40 +0100
commit50484559658d06203565df5af73bb20e279faa1c (patch)
treeb1f0235fc30040b77e07a97276d304d19df160b1 /synapse/config
parentRemove redundant docstring (diff)
downloadsynapse-50484559658d06203565df5af73bb20e279faa1c.tar.xz
Nicer get() shorthand
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/emailconfig.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py
index 761ac33112..4318c6f13d 100644
--- a/synapse/config/emailconfig.py
+++ b/synapse/config/emailconfig.py
@@ -23,9 +23,8 @@ class EmailConfig(Config):
     def read_config(self, config):
         self.email_enable_notifs = False
 
-        email_config = config.get("email", None)
-        if email_config:
-            self.email_enable_notifs = email_config.get("enable_notifs", True)
+        email_config = config.get("email", {})
+        self.email_enable_notifs = email_config.get("enable_notifs", True)
 
         if self.email_enable_notifs:
             required = [