diff options
author | Adrian Tschira <nota@notafile.com> | 2018-05-24 20:52:56 +0200 |
---|---|---|
committer | Adrian Tschira <nota@notafile.com> | 2018-05-24 20:55:08 +0200 |
commit | dd068ca9792e7f4a51690b91262131b5dae80455 (patch) | |
tree | 3a979667f0fc25653d3eb428bec23f4832085a4e /synapse/util/frozenutils.py | |
parent | Merge pull request #3278 from NotAFile/py3-storage-base (diff) | |
download | synapse-dd068ca9792e7f4a51690b91262131b5dae80455.tar.xz |
remaining isintance fixes
Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/util/frozenutils.py')
-rw-r--r-- | synapse/util/frozenutils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/util/frozenutils.py b/synapse/util/frozenutils.py index f497b51f4a..4cd0566f4f 100644 --- a/synapse/util/frozenutils.py +++ b/synapse/util/frozenutils.py @@ -16,6 +16,7 @@ from frozendict import frozendict import simplejson as json +from six import string_types def freeze(o): t = type(o) @@ -25,7 +26,7 @@ def freeze(o): if t is frozendict: return o - if t is str or t is unicode: + if isinstance(t, string_types): return o try: @@ -41,7 +42,7 @@ def unfreeze(o): if t is dict or t is frozendict: return dict({k: unfreeze(v) for k, v in o.items()}) - if t is str or t is unicode: + if isinstance(t, string_types): return o try: |