diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-07-05 11:10:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-05 11:10:53 +0100 |
commit | 3d31b39297c6877fc303fcc958641828e8a34d00 (patch) | |
tree | b392a29310a13aa3e9ccd445532d17c14b795712 | |
parent | Merge pull request #2330 from matrix-org/erikj/cache_size_factor (diff) | |
parent | Fix caching error in the push evaluator (diff) | |
download | synapse-3d31b39297c6877fc303fcc958641828e8a34d00.tar.xz |
Merge pull request #2332 from matrix-org/rav/fix_pushes
Fix caching error in the push evaluator
Diffstat (limited to '')
-rw-r--r-- | synapse/push/push_rule_evaluator.py | 4 |
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() |