summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-30 01:26:42 +0100
committerGitHub <noreply@github.com>2018-04-30 01:26:42 +0100
commitbc2017a5944c303999df6b2385e0d04a6364d2db (patch)
tree9e3dfea89b380fccfa5137838fd69ccd8e00d579 /synapse
parentMerge pull request #3151 from NotAFile/py3-xrange-1 (diff)
parentmove httplib import to six (diff)
downloadsynapse-bc2017a5944c303999df6b2385e0d04a6364d2db.tar.xz
Merge pull request #3153 from NotAFile/py3-httplib
move httplib import to six
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/federation.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index bab0db2904..f39233d846 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -16,7 +16,6 @@
 
 """Contains handlers for federation events."""
 
-import httplib
 import itertools
 import logging
 import sys
@@ -24,6 +23,7 @@ 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
 
@@ -890,7 +890,7 @@ class FederationHandler(BaseHandler):
             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",
             )
 
@@ -898,7 +898,7 @@ class FederationHandler(BaseHandler):
             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",
             )