summary refs log tree commit diff
path: root/synapse/federation/replication.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-04 15:09:34 +0000
committerErik Johnston <erik@matrix.org>2014-11-04 15:09:34 +0000
commitfc7b2b11a28b49a4d5b50fef66bae0faee47503f (patch)
treebfff0cb27f006ec414e19146a328b4226e6d2725 /synapse/federation/replication.py
parentAdd support for sending failures (diff)
downloadsynapse-fc7b2b11a28b49a4d5b50fef66bae0faee47503f.tar.xz
PEP8
Diffstat (limited to 'synapse/federation/replication.py')
-rw-r--r--synapse/federation/replication.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index 680e7322a6..98997998ff 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -81,7 +81,7 @@ class ReplicationLayer(object):
 
     def register_edu_handler(self, edu_type, handler):
         if edu_type in self.edu_handlers:
-            raise KeyError("Already have an EDU handler for %s" % (edu_type))
+            raise KeyError("Already have an EDU handler for %s" % (edu_type,))
 
         self.edu_handlers[edu_type] = handler
 
@@ -102,7 +102,9 @@ class ReplicationLayer(object):
           object to encode as JSON.
         """
         if query_type in self.query_handlers:
-            raise KeyError("Already have a Query handler for %s" % (query_type))
+            raise KeyError(
+                "Already have a Query handler for %s" % (query_type,)
+            )
 
         self.query_handlers[query_type] = handler
 
@@ -128,7 +130,10 @@ class ReplicationLayer(object):
         # TODO, add errback, etc.
         self._transaction_queue.enqueue_pdu(pdu, order)
 
-        logger.debug("[%s] transaction_layer.enqueue_pdu... done", pdu.event_id)
+        logger.debug(
+            "[%s] transaction_layer.enqueue_pdu... done",
+            pdu.event_id
+        )
 
     @log_function
     def send_edu(self, destination, edu_type, content):
@@ -317,7 +322,11 @@ class ReplicationLayer(object):
 
         if hasattr(transaction, "edus"):
             for edu in [Edu(**x) for x in transaction.edus]:
-                self.received_edu(transaction.origin, edu.edu_type, edu.content)
+                self.received_edu(
+                    transaction.origin,
+                    edu.edu_type,
+                    edu.content
+                )
 
         results = yield defer.DeferredList(dl)