diff options
Diffstat (limited to '')
-rw-r--r-- | synapse/http/client.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index 8bda42364b..29e6053bc1 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -100,7 +100,7 @@ class BaseHttpClient(object): retries_left = 5 - endpoint = self._getEndpoint(reactor, destination); + endpoint = self._getEndpoint(reactor, destination) while True: @@ -185,7 +185,7 @@ class MatrixHttpClient(BaseHttpClient): auth_headers = [] - for key,sig in request["signatures"][self.server_name].items(): + for key, sig in request["signatures"][self.server_name].items(): auth_headers.append(bytes( "X-Matrix origin=%s,key=\"%s\",sig=\"%s\"" % ( self.server_name, key, sig, @@ -280,7 +280,6 @@ class MatrixHttpClient(BaseHttpClient): defer.returnValue(json.loads(body)) - def _getEndpoint(self, reactor, destination): return matrix_endpoint( reactor, destination, timeout=10, @@ -355,6 +354,7 @@ class IdentityServerHttpClient(BaseHttpClient): defer.returnValue(json.loads(body)) + class CaptchaServerHttpClient(MatrixHttpClient): """Separate HTTP client for talking to google's captcha servers""" @@ -388,6 +388,7 @@ class CaptchaServerHttpClient(MatrixHttpClient): else: raise e + def _print_ex(e): if hasattr(e, "reasons") and e.reasons: for ex in e.reasons: |