diff options
author | Erik Johnston <erik@matrix.org> | 2017-10-02 13:52:03 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-10-02 13:52:03 +0100 |
commit | b23cb8fba8c783bf7a267bfbe33b50e010f17787 (patch) | |
tree | c43dc5b7ba3eb73bff695cae67f7c4122134a0ef /synapse/push/push_rule_evaluator.py | |
parent | Merge pull request #2464 from rnbdsh/patch-4 (diff) | |
parent | Bump version and change log (diff) | |
download | synapse-b23cb8fba8c783bf7a267bfbe33b50e010f17787.tar.xz |
Merge branch 'release-v0.23.0' of github.com:matrix-org/synapse v0.23.0
Diffstat (limited to 'synapse/push/push_rule_evaluator.py')
-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() |