summary refs log tree commit diff
path: root/synapse/rest/client/v1
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2016-11-11 15:02:29 +0000
committerKegan Dougal <kegan@matrix.org>2016-11-11 15:02:29 +0000
commita88bc67f88bf5b932283372818c7e33bedfbaa0b (patch)
tree259d3e4e5527eb1e444aceb5e89efa1619decf11 /synapse/rest/client/v1
parentUse ObservableDeferreds instead of Deferreds as they behave as intended (diff)
downloadsynapse-a88bc67f88bf5b932283372818c7e33bedfbaa0b.tar.xz
Flake8 and fix whoopsie
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r--synapse/rest/client/v1/room.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 47c4b84b73..a866615f71 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -224,7 +224,9 @@ class RoomSendEventRestServlet(ClientV1RestServlet):
         except KeyError:
             pass
 
-        res_deferred = ObservableDeferred(self.on_POST(request, room_id, event_type, txn_id))
+        res_deferred = ObservableDeferred(
+            self.on_POST(request, room_id, event_type, txn_id)
+        )
         self.txns.store_client_transaction(request, txn_id, res_deferred)
         response = yield res_deferred.observe()
         defer.returnValue(response)
@@ -625,13 +627,13 @@ class RoomMembershipRestServlet(ClientV1RestServlet):
     @defer.inlineCallbacks
     def on_PUT(self, request, room_id, membership_action, txn_id):
         try:
-            res_deferred = ObservableDeferred(self.txns.get_client_transaction(request, txn_id))
+            res_deferred = self.txns.get_client_transaction(request, txn_id)
             res = yield res_deferred.observe()
             defer.returnValue(res)
         except KeyError:
             pass
 
-        res_deferred = ObservableDeffself.on_POST(request, room_id, membership_action, txn_id)
+        res_deferred = ObservableDeferred(self.on_POST(request, room_id, membership_action, txn_id))
         self.txns.store_client_transaction(request, txn_id, res_deferred)
         response = yield res_deferred.observe()
         defer.returnValue(response)
@@ -675,7 +677,9 @@ class RoomRedactEventRestServlet(ClientV1RestServlet):
         except KeyError:
             pass
 
-        res_deferred = ObservableDeferred(self.on_POST(request, room_id, event_id, txn_id))
+        res_deferred = ObservableDeferred(
+            self.on_POST(request, room_id, event_id, txn_id)
+        )
         self.txns.store_client_transaction(request, txn_id, res_deferred)
         response = yield res_deferred.observe()
         defer.returnValue(response)