mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 09:09:24 -05:00
Merge pull request #3153 from NotAFile/py3-httplib
move httplib import to six
This commit is contained in:
commit
bc2017a594
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
"""Contains handlers for federation events."""
|
"""Contains handlers for federation events."""
|
||||||
|
|
||||||
import httplib
|
|
||||||
import itertools
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
@ -24,6 +23,7 @@ import sys
|
|||||||
from signedjson.key import decode_verify_key_bytes
|
from signedjson.key import decode_verify_key_bytes
|
||||||
from signedjson.sign import verify_signed_json
|
from signedjson.sign import verify_signed_json
|
||||||
import six
|
import six
|
||||||
|
from six.moves import http_client
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
from unpaddedbase64 import decode_base64
|
from unpaddedbase64 import decode_base64
|
||||||
|
|
||||||
@ -890,7 +890,7 @@ class FederationHandler(BaseHandler):
|
|||||||
logger.warn("Rejecting event %s which has %i prev_events",
|
logger.warn("Rejecting event %s which has %i prev_events",
|
||||||
ev.event_id, len(ev.prev_events))
|
ev.event_id, len(ev.prev_events))
|
||||||
raise SynapseError(
|
raise SynapseError(
|
||||||
httplib.BAD_REQUEST,
|
http_client.BAD_REQUEST,
|
||||||
"Too many prev_events",
|
"Too many prev_events",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -898,7 +898,7 @@ class FederationHandler(BaseHandler):
|
|||||||
logger.warn("Rejecting event %s which has %i auth_events",
|
logger.warn("Rejecting event %s which has %i auth_events",
|
||||||
ev.event_id, len(ev.auth_events))
|
ev.event_id, len(ev.auth_events))
|
||||||
raise SynapseError(
|
raise SynapseError(
|
||||||
httplib.BAD_REQUEST,
|
http_client.BAD_REQUEST,
|
||||||
"Too many auth_events",
|
"Too many auth_events",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user