summary refs log tree commit diff
path: root/synapse/handlers/user_directory.py
diff options
context:
space:
mode:
authorAdrian Tschira <nota@notafile.com>2018-04-28 13:19:12 +0200
committerAdrian Tschira <nota@notafile.com>2018-05-19 17:59:26 +0200
commit933bf2dd357842b0e7c3fc7a1111d89ab52f5329 (patch)
tree3a40de02b5227d0cb2ee4725b1c70b33868c45f9 /synapse/handlers/user_directory.py
parentMerge pull request #3241 from matrix-org/fix_user_visits_insertion (diff)
downloadsynapse-933bf2dd357842b0e7c3fc7a1111d89ab52f5329.tar.xz
replace some iteritems with six
Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/handlers/user_directory.py')
-rw-r--r--synapse/handlers/user_directory.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/user_directory.py b/synapse/handlers/user_directory.py
index 714f0195c8..cd0b7290f0 100644
--- a/synapse/handlers/user_directory.py
+++ b/synapse/handlers/user_directory.py
@@ -22,6 +22,7 @@ from synapse.util.metrics import Measure
 from synapse.util.async import sleep
 from synapse.types import get_localpart_from_id
 
+from six import iteritems
 
 logger = logging.getLogger(__name__)
 
@@ -403,7 +404,7 @@ class UserDirectoryHandler(object):
 
         if change:
             users_with_profile = yield self.state.get_current_user_in_room(room_id)
-            for user_id, profile in users_with_profile.iteritems():
+            for user_id, profile in iteritems(users_with_profile):
                 yield self._handle_new_user(room_id, user_id, profile)
         else:
             users = yield self.store.get_users_in_public_due_to_room(room_id)