mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:46:02 -04:00
Replace all remaining six usage with native Python 3 equivalents (#7704)
This commit is contained in:
parent
98c4e35e3c
commit
a3f11567d9
73 changed files with 111 additions and 237 deletions
|
@ -17,8 +17,6 @@
|
|||
import logging
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from six import string_types
|
||||
|
||||
from canonicaljson import encode_canonical_json, json
|
||||
|
||||
from twisted.internet import defer
|
||||
|
@ -715,7 +713,7 @@ class EventCreationHandler(object):
|
|||
|
||||
spam_error = self.spam_checker.check_event_for_spam(event)
|
||||
if spam_error:
|
||||
if not isinstance(spam_error, string_types):
|
||||
if not isinstance(spam_error, str):
|
||||
spam_error = "Spam is not permitted here"
|
||||
raise SynapseError(403, spam_error, Codes.FORBIDDEN)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue