summary refs log tree commit diff
path: root/synapse/handlers/appservice.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-08-18 16:58:25 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-08-18 16:58:25 +0100
commit2a91799fccd0791083131e8b23ac0b900e42b7f4 (patch)
tree577dacff8c06840b98a5c884cbc16ce630b58539 /synapse/handlers/appservice.py
parentAppease pep8 (diff)
downloadsynapse-2a91799fccd0791083131e8b23ac0b900e42b7f4.tar.xz
Minor syntax neatenings
Diffstat (limited to '')
-rw-r--r--synapse/handlers/appservice.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index a2715e5cf6..03452f6bb0 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -172,13 +172,10 @@ class ApplicationServicesHandler(object):
     def query_3pu(self, protocol, fields):
         services = yield self._get_services_for_3pn(protocol)
 
-        deferreds = []
-        for service in services:
-            deferreds.append(self.appservice_api.query_3pu(
-                service, protocol, fields
-            ))
-
-        results = yield defer.DeferredList(deferreds, consumeErrors=True)
+        results = yield defer.DeferredList([
+            self.appservice_api.query_3pu(service, protocol, fields)
+            for service in services
+        ], consumeErrors=True)
 
         ret = []
         for (success, result) in results:
@@ -199,13 +196,10 @@ class ApplicationServicesHandler(object):
     def query_3pl(self, protocol, fields):
         services = yield self._get_services_for_3pn(protocol)
 
-        deferreds = []
-        for service in services:
-            deferreds.append(self.appservice_api.query_3pl(
-                service, protocol, fields
-            ))
-
-        results = yield defer.DeferredList(deferreds, consumeErrors=True)
+        results = yield defer.DeferredList([
+            self.appservice_api.query_3pl(service, protocol, fields)
+            for service in services
+        ], consumeErrors=True)
 
         ret = []
         for (success, result) in results: