summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2015-03-12 16:24:38 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2015-03-12 16:24:51 +0000
commit128cf2daf76e5b05a4e577b60ea406fdbb6986bf (patch)
tree1eeda21c7b8af0d08a57f46a2ec2c81f4fe3f326 /synapse/http
parentOption to serve metrics from their own localhost-only TCP port instead of mux... (diff)
downloadsynapse-128cf2daf76e5b05a4e577b60ea406fdbb6986bf.tar.xz
Appease pep8
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/client.py10
-rw-r--r--synapse/http/matrixfederationclient.py10
-rw-r--r--synapse/http/server.py8
3 files changed, 19 insertions, 9 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py
index 01737a7188..2ae1c4d3a4 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -34,11 +34,13 @@ logger = logging.getLogger(__name__)
 
 metrics = synapse.metrics.get_metrics_for(__name__)
 
-outgoing_requests_counter = metrics.register_counter("requests",
+outgoing_requests_counter = metrics.register_counter(
+    "requests",
     labels=["method"],
 )
-incoming_responses_counter = metrics.register_counter("responses",
-    labels=["method","code"],
+incoming_responses_counter = metrics.register_counter(
+    "responses",
+    labels=["method", "code"],
 )
 
 
@@ -64,9 +66,11 @@ class SimpleHttpClient(object):
         def _cb(response):
             incoming_responses_counter.inc(method, response.code)
             return response
+
         def _eb(failure):
             incoming_responses_counter.inc(method, "ERR")
             return failure
+
         d.addCallbacks(_cb, _eb)
 
         return d
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 11883d3852..7fa295cad5 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -43,11 +43,13 @@ logger = logging.getLogger(__name__)
 
 metrics = synapse.metrics.get_metrics_for(__name__)
 
-outgoing_requests_counter = metrics.register_counter("requests",
+outgoing_requests_counter = metrics.register_counter(
+    "requests",
     labels=["method"],
 )
-incoming_responses_counter = metrics.register_counter("responses",
-    labels=["method","code"],
+incoming_responses_counter = metrics.register_counter(
+    "responses",
+    labels=["method", "code"],
 )
 
 
@@ -78,9 +80,11 @@ class MatrixFederationHttpAgent(_AgentBase):
         def _cb(response):
             incoming_responses_counter.inc(method, response.code)
             return response
+
         def _eb(failure):
             incoming_responses_counter.inc(method, "ERR")
             return failure
+
         d.addCallbacks(_cb, _eb)
 
         return d
diff --git a/synapse/http/server.py b/synapse/http/server.py
index a0d190ff78..d77cb77799 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -37,11 +37,13 @@ logger = logging.getLogger(__name__)
 
 metrics = synapse.metrics.get_metrics_for(__name__)
 
-incoming_requests_counter = metrics.register_counter("requests",
+incoming_requests_counter = metrics.register_counter(
+    "requests",
     labels=["method", "servlet"],
 )
-outgoing_responses_counter = metrics.register_counter("responses",
-    labels=["method","code"],
+outgoing_responses_counter = metrics.register_counter(
+    "responses",
+    labels=["method", "code"],
 )