summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-10-09 09:39:13 +0100
committerDavid Baker <dave@matrix.org>2018-10-09 09:39:13 +0100
commit0c905ee015fdbf0d61f46db600fd79a18d0b6376 (patch)
tree5e80a682f92c439c5f90259133091b7b1d506397 /synapse
parentDon't reuse backup versions (diff)
downloadsynapse-0c905ee015fdbf0d61f46db600fd79a18d0b6376.tar.xz
be python3 compatible
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/e2e_room_keys.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/e2e_room_keys.py b/synapse/handlers/e2e_room_keys.py
index 2c330382cf..117144bb6e 100644
--- a/synapse/handlers/e2e_room_keys.py
+++ b/synapse/handlers/e2e_room_keys.py
@@ -15,6 +15,7 @@
 
 import logging
 
+from six import iteritems
 from twisted.internet import defer
 
 from synapse.api.errors import RoomKeysVersionError, StoreError, SynapseError
@@ -137,8 +138,8 @@ class E2eRoomKeysHandler(object):
 
             # go through the room_keys.
             # XXX: this should/could be done concurrently, given we're in a lock.
-            for room_id, room in room_keys['rooms'].iteritems():
-                for session_id, session in room['sessions'].iteritems():
+            for room_id, room in iteritems(room_keys['rooms']):
+                for session_id, session in iteritems(room['sessions']):
                     yield self._upload_room_key(
                         user_id, version, room_id, session_id, session
                     )