[dataimport] import range from six.moves
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 21 Oct 2015 20:20:36 +0200
changeset 10859 375a8232e61c
parent 10858 1a3e56e346d2
child 10860 252877c624f0
[dataimport] import range from six.moves
dataimport/massive_store.py
--- a/dataimport/massive_store.py	Wed Oct 21 20:19:51 2015 +0200
+++ b/dataimport/massive_store.py	Wed Oct 21 20:20:36 2015 +0200
@@ -22,6 +22,8 @@
 from collections import defaultdict
 from io import StringIO
 
+from six.moves import range
+
 from yams.constraints import SizeConstraint
 
 from psycopg2 import ProgrammingError
@@ -413,7 +415,7 @@
         storing them"""
         while True:
             last_eid = self._cnx.repo.system_source.create_eid(self._cnx, self._eids_seq_range)
-            for eid in xrange(last_eid - self._eids_seq_range + 1, last_eid + 1):
+            for eid in range(last_eid - self._eids_seq_range + 1, last_eid + 1):
                 yield eid
 
     def apply_size_constraints(self, etype, kwargs):