diff options
author | Adrian Tschira <nota@notafile.com> | 2018-04-28 13:57:00 +0200 |
---|---|---|
committer | Adrian Tschira <nota@notafile.com> | 2018-04-28 13:57:00 +0200 |
commit | d82b6ea9e68150aece1fc46cb0821b31cf728910 (patch) | |
tree | b4a57fab25332b4be822ede7b38a67868caa28d3 /synapse/federation | |
parent | Merge pull request #3127 from matrix-org/rav/deferred_timeout (diff) | |
download | synapse-d82b6ea9e68150aece1fc46cb0821b31cf728910.tar.xz |
Move more xrange to six
plus a bonus next() Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_client.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index 8e2c0c4cd2..a2067fc390 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -19,6 +19,8 @@ import itertools import logging import random +from six.moves import range + from twisted.internet import defer from synapse.api.constants import Membership @@ -413,7 +415,7 @@ class FederationClient(FederationBase): batch_size = 20 missing_events = list(missing_events) - for i in xrange(0, len(missing_events), batch_size): + for i in range(0, len(missing_events), batch_size): batch = set(missing_events[i:i + batch_size]) deferreds = [ |