diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-04-30 01:20:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 01:20:06 +0100 |
commit | 683149c1f98fec9bc39835083e608057af535b10 (patch) | |
tree | 0816263ed10369755f1aea7090cd39ee4dea56d7 /synapse/storage/stream.py | |
parent | Merge branch 'rav/test_36' into develop (diff) | |
parent | Merge branch 'develop' into py3-xrange-1 (diff) | |
download | synapse-683149c1f98fec9bc39835083e608057af535b10.tar.xz |
Merge pull request #3151 from NotAFile/py3-xrange-1
Move more xrange to six
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r-- | synapse/storage/stream.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index 4a5481ae53..f0784ba137 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([ run_in_background( self.get_room_events_stream_for_room, |