diff options
author | Erik Johnston <erik@matrix.org> | 2018-08-03 09:25:15 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-08-03 09:25:15 +0100 |
commit | cb298ff623c1ad375084f7687b7f6e546c4c1c1f (patch) | |
tree | 81854fc4ae0a45bed487a58f2c40974b683adb92 /synapse/util/frozenutils.py | |
parent | Newsfile (diff) | |
parent | Merge pull request #3645 from matrix-org/michaelkaye/mention_newsfragment (diff) | |
download | synapse-cb298ff623c1ad375084f7687b7f6e546c4c1c1f.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_repl_servlet
Diffstat (limited to 'synapse/util/frozenutils.py')
-rw-r--r-- | synapse/util/frozenutils.py | 6 |
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: |