summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/events/spamcheck.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/events/spamcheck.py b/synapse/events/spamcheck.py
index 8ddbf2ca38..e739f105b2 100644
--- a/synapse/events/spamcheck.py
+++ b/synapse/events/spamcheck.py
@@ -18,8 +18,14 @@ class SpamChecker(object):
     def __init__(self, hs):
         self.spam_checker = None
 
-        if hs.config.spam_checker is not None:
+        module = None
+        config = None
+        try:
             module, config = hs.config.spam_checker
+        except:
+            pass
+
+        if module is not None:
             self.spam_checker = module(config=config)
 
     def check_event_for_spam(self, event):