mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 08:43:27 +00:00
Nicer get() shorthand
This commit is contained in:
1 parent
6c8957be7f
commit
5048455965
1 file changed
+2
-3
@@ -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 = [
|
||||
|
||||
Reference in new issue
Block a user