diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-10-30 11:13:58 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-10-30 11:13:58 +0000 |
commit | 7c063995123297dfd569f68e0f195cad7fa327c5 (patch) | |
tree | 2ce0eb2215707808c689ac9ea9787fff8a9c7664 /synapse/http/client.py | |
parent | Pep8 and a few doc strings (diff) | |
parent | Fix pep8 warnings (diff) | |
download | synapse-7c063995123297dfd569f68e0f195cad7fa327c5.tar.xz |
Merge branch 'develop' into request_logging
Conflicts: synapse/config/logger.py
Diffstat (limited to 'synapse/http/client.py')
-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: |