diff options
author | Erik Johnston <erikj@jki.re> | 2018-05-24 16:08:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 16:08:57 +0100 |
commit | 46345187cc7fed4137ce8f669d33a6e590dca471 (patch) | |
tree | 0dc10f431ba45079c8adc71dbc898cc374146d52 /synapse/push | |
parent | Merge branch 'master' into develop (diff) | |
parent | Replace some more comparisons with six (diff) | |
download | synapse-46345187cc7fed4137ce8f669d33a6e590dca471.tar.xz |
Merge pull request #3243 from NotAFile/py3-six-3
Replace some more comparisons with six
Diffstat (limited to 'synapse/push')
-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 3601f2d365..d55efde8cc 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) |