summary refs log tree commit diff
path: root/synapse/http/matrixfederationclient.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-10 10:16:09 +0000
committerErik Johnston <erik@matrix.org>2014-12-10 10:16:09 +0000
commitb8d30899b1296347a75d5a59e32d73a5236e6ea2 (patch)
treecf5625398f3e284c0ef1901850ca46ad4ccdb507 /synapse/http/matrixfederationclient.py
parentplateau retries after 1h (diff)
downloadsynapse-b8d30899b1296347a75d5a59e32d73a5236e6ea2.tar.xz
Code style.
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r--synapse/http/matrixfederationclient.py29
1 files changed, 21 insertions, 8 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 8fc6bf8f97..16fb2adab5 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -130,12 +130,20 @@ class MatrixFederationHttpClient(object):
                 break
             except Exception as e:
                 if not retry_on_dns_fail and isinstance(e, DNSLookupError):
-                    logger.warn("DNS Lookup failed to %s with %s", destination,
-                                e)
+                    logger.warn(
+                        "DNS Lookup failed to %s with %s",
+                        destination,
+                        e
+                    )
                     raise SynapseError(400, "Domain specified not found.")
 
-                logger.warn("Sending request failed to %s: %s %s : %s",
-                                 destination, method, url_bytes, e)
+                logger.warn(
+                    "Sending request failed to %s: %s %s : %s",
+                    destination,
+                    method,
+                    url_bytes,
+                    e
+                )
                 _print_ex(e)
 
                 if retries_left:
@@ -144,10 +152,15 @@ class MatrixFederationHttpClient(object):
                 else:
                     raise
 
-        logger.info("Received response %d %s for %s: %s %s",
-                    response.code, response.phrase,
-                    destination, method, url_bytes)
-        
+        logger.info(
+            "Received response %d %s for %s: %s %s",
+            response.code,
+            response.phrase,
+            destination,
+            method,
+            url_bytes
+        )
+
         if 200 <= response.code < 300:
             # We need to update the transactions table to say it was sent?
             pass