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/handlers/message.py | |
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/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 354da9a3b5..200127d291 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -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) |