Replace all remaining six usage with native Python 3 equivalents (#7704)

This commit is contained in:
Dagfinn Ilmari Mannsåker 2020-06-16 13:51:47 +01:00 committed by GitHub
parent 98c4e35e3c
commit a3f11567d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 111 additions and 237 deletions

View file

@ -17,8 +17,6 @@
import logging
from six import string_types
from synapse.api.errors import Codes, SynapseError
from synapse.types import GroupID, RoomID, UserID, get_domain_from_id
from synapse.util.async_helpers import concurrently_execute
@ -513,7 +511,7 @@ class GroupsServerHandler(GroupsServerWorkerHandler):
for keyname in ("name", "avatar_url", "short_description", "long_description"):
if keyname in content:
value = content[keyname]
if not isinstance(value, string_types):
if not isinstance(value, str):
raise SynapseError(400, "%r value is not a string" % (keyname,))
profile[keyname] = value