summary refs log tree commit diff
path: root/synapse/storage/registration.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/registration.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/registration.py')
-rw-r--r--synapse/storage/registration.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index 6b557ca0cf..a50717db2d 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -22,6 +22,8 @@ from synapse.storage import background_updates
 from synapse.storage._base import SQLBaseStore
 from synapse.util.caches.descriptors import cached, cachedInlineCallbacks
 
+from six.moves import range
+
 
 class RegistrationWorkerStore(SQLBaseStore):
     @cached()
@@ -469,7 +471,7 @@ class RegistrationStore(RegistrationWorkerStore,
                 match = regex.search(user_id)
                 if match:
                     found.add(int(match.group(1)))
-            for i in xrange(len(found) + 1):
+            for i in range(len(found) + 1):
                 if i not in found:
                     return i