summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2017-07-05 11:10:53 +0100
committerGitHub <noreply@github.com>2017-07-05 11:10:53 +0100
commit3d31b39297c6877fc303fcc958641828e8a34d00 (patch)
treeb392a29310a13aa3e9ccd445532d17c14b795712
parentMerge pull request #2330 from matrix-org/erikj/cache_size_factor (diff)
parentFix caching error in the push evaluator (diff)
downloadsynapse-3d31b39297c6877fc303fcc958641828e8a34d00.tar.xz
Merge pull request #2332 from matrix-org/rav/fix_pushes
Fix caching error in the push evaluator
-rw-r--r--synapse/push/push_rule_evaluator.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py
index 4d88046579..172c27c137 100644
--- a/synapse/push/push_rule_evaluator.py
+++ b/synapse/push/push_rule_evaluator.py
@@ -200,7 +200,9 @@ def _glob_to_re(glob, word_boundary):
         return re.compile(r, flags=re.IGNORECASE)
 
 
-def _flatten_dict(d, prefix=[], result={}):
+def _flatten_dict(d, prefix=[], result=None):
+    if result is None:
+        result = {}
     for key, value in d.items():
         if isinstance(value, basestring):
             result[".".join(prefix + [key])] = value.lower()