diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-08-02 00:54:06 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-02 00:54:06 +1000 |
commit | da7785147df442eb9cdc1031fa5fea12b7b25334 (patch) | |
tree | 4a10c31ba0cda805cd31047cdbb4aa9ccb32a8ce /synapse/util | |
parent | Merge pull request #3543 from bebehei/docker (diff) | |
download | synapse-da7785147df442eb9cdc1031fa5fea12b7b25334.tar.xz |
Python 3: Convert some unicode/bytes uses (#3569)
Diffstat (limited to 'synapse/util')
-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: |