summary refs log tree commit diff
path: root/synapse/federation/federation_server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-20 15:43:52 +0100
committerGitHub <noreply@github.com>2018-04-20 15:43:52 +0100
commitdc875d2712d1b844fa8ef398bab7894867d0cf60 (patch)
tree36477571ae07c3aab0898c8e994cf9964232cbde /synapse/federation/federation_server.py
parentMerge pull request #3107 from NotAFile/py3-bool-nonzero (diff)
parentUse six.itervalues in some places (diff)
downloadsynapse-dc875d2712d1b844fa8ef398bab7894867d0cf60.tar.xz
Merge pull request #3106 from NotAFile/py3-six-itervalues-1
Use six.itervalues in some places
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r--synapse/federation/federation_server.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 12843fe179..7785417311 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -32,6 +32,8 @@ from synapse.util import async
 from synapse.util.caches.response_cache import ResponseCache
 from synapse.util.logutils import log_function
 
+from six import iteritems
+
 # when processing incoming transactions, we try to handle multiple rooms in
 # parallel, up to this limit.
 TRANSACTION_CONCURRENCY_LIMIT = 10
@@ -425,9 +427,9 @@ class FederationServer(FederationBase):
             "Claimed one-time-keys: %s",
             ",".join((
                 "%s for %s:%s" % (key_id, user_id, device_id)
-                for user_id, user_keys in json_result.iteritems()
-                for device_id, device_keys in user_keys.iteritems()
-                for key_id, _ in device_keys.iteritems()
+                for user_id, user_keys in iteritems(json_result)
+                for device_id, device_keys in iteritems(user_keys)
+                for key_id, _ in iteritems(device_keys)
             )),
         )