diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-28 18:57:23 +1000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-28 18:57:23 +1000 |
commit | 754826a8305b3f32a45367cb6bd8bb26bd489a6b (patch) | |
tree | c5aba5e1e720474b3f94d15bd9202bda0b120e20 /synapse/push/push_rule_evaluator.py | |
parent | pepeightttt (diff) | |
parent | Merge pull request #3288 from matrix-org/rav/no_spam_guests (diff) | |
download | synapse-754826a8305b3f32a45367cb6bd8bb26bd489a6b.tar.xz |
Merge remote-tracking branch 'origin/develop' into 3218-official-prom
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 c3e6c5c258..cf735f7468 100644 --- a/synapse/push/push_rule_evaluator.py +++ b/synapse/push/push_rule_evaluator.py @@ -21,6 +21,8 @@ from synapse.types import UserID from synapse.util.caches import CACHE_SIZE_FACTOR, register_cache from synapse.util.caches.lrucache import LruCache +from six import string_types + logger = logging.getLogger(__name__) @@ -238,7 +240,7 @@ def _flatten_dict(d, prefix=[], result=None): if result is None: result = {} for key, value in d.items(): - if isinstance(value, basestring): + if isinstance(value, string_types): result[".".join(prefix + [key])] = value.lower() elif hasattr(value, "items"): _flatten_dict(value, prefix=(prefix + [key]), result=result) |