diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2020-06-16 13:51:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 08:51:47 -0400 |
commit | a3f11567d930b7da0db068c3b313f6f4abbf12a1 (patch) | |
tree | ee9f7b2e8a8e088b4f745f07d79867ad2b163211 /synapse/rest/client/v1 | |
parent | Convert the device message and pagination handlers to async/await. (#7678) (diff) | |
download | synapse-a3f11567d930b7da0db068c3b313f6f4abbf12a1.tar.xz |
Replace all remaining six usage with native Python 3 equivalents (#7704)
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r-- | synapse/rest/client/v1/presence.py | 4 | ||||
-rw-r--r-- | synapse/rest/client/v1/room.py | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/synapse/rest/client/v1/presence.py b/synapse/rest/client/v1/presence.py index 7cf007d35e..970fdd5834 100644 --- a/synapse/rest/client/v1/presence.py +++ b/synapse/rest/client/v1/presence.py @@ -17,8 +17,6 @@ """ import logging -from six import string_types - from synapse.api.errors import AuthError, SynapseError from synapse.handlers.presence import format_user_presence_state from synapse.http.servlet import RestServlet, parse_json_object_from_request @@ -73,7 +71,7 @@ class PresenceStatusRestServlet(RestServlet): if "status_msg" in content: state["status_msg"] = content.pop("status_msg") - if not isinstance(state["status_msg"], string_types): + if not isinstance(state["status_msg"], str): raise SynapseError(400, "status_msg must be a string.") if content: diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 105e0cf4d2..46811abbfa 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -18,8 +18,7 @@ import logging import re from typing import List, Optional - -from six.moves.urllib import parse as urlparse +from urllib import parse as urlparse from canonicaljson import json |