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/schema | |
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/schema')
-rw-r--r-- | synapse/storage/schema/delta/30/as_users.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/30/as_users.py b/synapse/storage/schema/delta/30/as_users.py index c53e53c94f..85bd1a2006 100644 --- a/synapse/storage/schema/delta/30/as_users.py +++ b/synapse/storage/schema/delta/30/as_users.py @@ -14,6 +14,8 @@ import logging from synapse.config.appservice import load_appservices +from six.moves import range + logger = logging.getLogger(__name__) @@ -58,7 +60,7 @@ def run_upgrade(cur, database_engine, config, *args, **kwargs): for as_id, user_ids in owned.items(): n = 100 - user_chunks = (user_ids[i:i + 100] for i in xrange(0, len(user_ids), n)) + user_chunks = (user_ids[i:i + 100] for i in range(0, len(user_ids), n)) for chunk in user_chunks: cur.execute( database_engine.convert_param_style( |