summary refs log tree commit diff
path: root/synapse/storage/schema
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/schema
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/schema')
-rw-r--r--synapse/storage/schema/delta/30/as_users.py4
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(