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

Commit

Permalink
Merge pull request #3153 from NotAFile/py3-httplib
Browse files Browse the repository at this point in the history
move httplib import to six
  • Loading branch information
richvdh authored Apr 30, 2018
2 parents 683149c + 94f4d7f commit bc2017a
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 @@ -890,15 +890,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 bc2017a

Please sign in to comment.