summary refs log tree commit diff
path: root/synapse/storage/event_federation.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-20 15:35:00 +0100
committerGitHub <noreply@github.com>2018-04-20 15:35:00 +0100
commitc09a6daf09bac12f7aa5920eb87d15a4b7bf04b5 (patch)
treedaca6a9318498596b4b150d4aa5e341d92ff694b /synapse/storage/event_federation.py
parentMerge pull request #3103 from NotAFile/py3-baseexcepton-message (diff)
parentReplace Queue with six.moves.queue (diff)
downloadsynapse-c09a6daf09bac12f7aa5920eb87d15a4b7bf04b5.tar.xz
Merge pull request #3110 from NotAFile/py3-six-queue
Replace Queue with six.moves.queue
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r--synapse/storage/event_federation.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py
index a183fc6b50..8fbf7ffba7 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -25,7 +25,9 @@ from synapse.util.caches.descriptors import cached
 from unpaddedbase64 import encode_base64
 
 import logging
-from Queue import PriorityQueue, Empty
+from six.moves.queue import PriorityQueue, Empty
+
+from six.moves import range
 
 
 logger = logging.getLogger(__name__)
@@ -79,7 +81,7 @@ class EventFederationWorkerStore(EventsWorkerStore, SignatureWorkerStore,
             front_list = list(front)
             chunks = [
                 front_list[x:x + 100]
-                for x in xrange(0, len(front), 100)
+                for x in range(0, len(front), 100)
             ]
             for chunk in chunks:
                 txn.execute(