summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorAdrian Tschira <nota@notafile.com>2018-04-15 21:37:58 +0200
committerAdrian Tschira <nota@notafile.com>2018-04-16 00:46:21 +0200
commit878995e660e46c5dedb56cde8bd7a3d46838cdd7 (patch)
tree5f38eb9d6fb2e6de496c0fc4870486e5f960d986 /synapse/storage
parentMerge branch 'master' of https://github.com/matrix-org/synapse into develop (diff)
downloadsynapse-878995e660e46c5dedb56cde8bd7a3d46838cdd7.tar.xz
Replace Queue with six.moves.queue
and a six.range change which I missed the last time

Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/storage')
-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 00ee82d300..e828328243 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -24,7 +24,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__)
@@ -78,7 +80,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(