summary refs log tree commit diff
path: root/synapse/util/frozenutils.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-06 13:33:54 +0100
committerErik Johnston <erik@matrix.org>2018-08-06 13:33:54 +0100
commit49a316395831a0676160833c39daa0bb63ceea09 (patch)
treef1c4db4121d7890a7ba390c01b0e81e329f09b22 /synapse/util/frozenutils.py
parentMerge branch 'release-v0.33.1' of github.com:matrix-org/synapse into matrix-o... (diff)
parentReturn M_NOT_FOUND when a profile could not be found. (#3596) (diff)
downloadsynapse-49a316395831a0676160833c39daa0bb63ceea09.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/util/frozenutils.py')
-rw-r--r--synapse/util/frozenutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/util/frozenutils.py b/synapse/util/frozenutils.py

index 581c6052ac..014edea971 100644 --- a/synapse/util/frozenutils.py +++ b/synapse/util/frozenutils.py
@@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from six import string_types +from six import binary_type, text_type from canonicaljson import json from frozendict import frozendict @@ -26,7 +26,7 @@ def freeze(o): if isinstance(o, frozendict): return o - if isinstance(o, string_types): + if isinstance(o, (binary_type, text_type)): return o try: @@ -41,7 +41,7 @@ def unfreeze(o): if isinstance(o, (dict, frozendict)): return dict({k: unfreeze(v) for k, v in o.items()}) - if isinstance(o, string_types): + if isinstance(o, (binary_type, text_type)): return o try: