summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
authorAdrian Tschira <nota@notafile.com>2018-04-28 13:57:00 +0200
committerAdrian Tschira <nota@notafile.com>2018-04-28 13:57:00 +0200
commitd82b6ea9e68150aece1fc46cb0821b31cf728910 (patch)
treeb4a57fab25332b4be822ede7b38a67868caa28d3 /synapse/storage/stream.py
parentMerge pull request #3127 from matrix-org/rav/deferred_timeout (diff)
downloadsynapse-d82b6ea9e68150aece1fc46cb0821b31cf728910.tar.xz
Move more xrange to six
plus a bonus next()

Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r--synapse/storage/stream.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 3b8b539993..52c90d8e04 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -47,6 +47,8 @@ from synapse.storage.engines import PostgresEngine, Sqlite3Engine
 import abc
 import logging
 
+from six.moves import range
+
 
 logger = logging.getLogger(__name__)
 
@@ -196,7 +198,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
 
         results = {}
         room_ids = list(room_ids)
-        for rm_ids in (room_ids[i:i + 20] for i in xrange(0, len(room_ids), 20)):
+        for rm_ids in (room_ids[i:i + 20] for i in range(0, len(room_ids), 20)):
             res = yield make_deferred_yieldable(defer.gatherResults([
                 preserve_fn(self.get_room_events_stream_for_room)(
                     room_id, from_key, to_key, limit, order=order,