mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Move more xrange to six
plus a bonus next() Signed-off-by: Adrian Tschira <nota@notafile.com>
This commit is contained in:
parent
9558236728
commit
d82b6ea9e6
9 changed files with 28 additions and 11 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue