Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
move httplib import to six
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAFile committed Apr 28, 2018
1 parent 9558236 commit 94f4d7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

"""Contains handlers for federation events."""

import httplib
import itertools
import logging
import sys

from signedjson.key import decode_verify_key_bytes
from signedjson.sign import verify_signed_json
import six
from six.moves import http_client
from twisted.internet import defer
from unpaddedbase64 import decode_base64

Expand Down Expand Up @@ -889,15 +889,15 @@ def _sanity_check_event(self, ev):
logger.warn("Rejecting event %s which has %i prev_events",
ev.event_id, len(ev.prev_events))
raise SynapseError(
httplib.BAD_REQUEST,
http_client.BAD_REQUEST,
"Too many prev_events",
)

if len(ev.auth_events) > 10:
logger.warn("Rejecting event %s which has %i auth_events",
ev.event_id, len(ev.auth_events))
raise SynapseError(
httplib.BAD_REQUEST,
http_client.BAD_REQUEST,
"Too many auth_events",
)

Expand Down

0 comments on commit 94f4d7f

Please sign in to comment.