summary refs log tree commit diff
path: root/synapse/push/pusher.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-02-20 14:15:56 +0000
committerRichard van der Hoff <richard@matrix.org>2019-02-20 14:15:56 +0000
commit4da63d9f6fc404b00d8c39b200f9f67c29d5dfa9 (patch)
tree43ac96a5b91bbc498228f44798cdc260de1f47c0 /synapse/push/pusher.py
parentApply the pusher http hack in the right place (#4692) (diff)
parentLogging improvements for the pusher (#4691) (diff)
downloadsynapse-4da63d9f6fc404b00d8c39b200f9f67c29d5dfa9.tar.xz
Merge branch 'develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/push/pusher.py')
-rw-r--r--synapse/push/pusher.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/push/pusher.py b/synapse/push/pusher.py

index fcee6d9d7e..368d5094be 100644 --- a/synapse/push/pusher.py +++ b/synapse/push/pusher.py
@@ -52,11 +52,12 @@ class PusherFactory(object): logger.info("defined email pusher type") def create_pusher(self, pusherdict): - logger.info("trying to create_pusher for %r", pusherdict) - - if pusherdict['kind'] in self.pusher_types: - logger.info("found pusher") - return self.pusher_types[pusherdict['kind']](self.hs, pusherdict) + kind = pusherdict['kind'] + f = self.pusher_types.get(kind, None) + if not f: + return None + logger.info("creating %s pusher for %r", kind, pusherdict) + return f(self.hs, pusherdict) def _create_email_pusher(self, _hs, pusherdict): app_name = self._app_name_from_pusherdict(pusherdict)