server/querier.py
changeset 10609 e2d8e81bfe68
parent 10589 7c23b7de2b8d
child 10612 84468b90e9c1
--- a/server/querier.py	Tue Sep 15 15:07:13 2015 +0200
+++ b/server/querier.py	Tue Sep 15 16:56:57 2015 +0200
@@ -24,6 +24,8 @@
 
 from itertools import repeat
 
+from six.moves import range
+
 from rql import RQLSyntaxError, CoercionError
 from rql.stmts import Union
 from rql.nodes import ETYPE_PYOBJ_MAP, etype_from_pyobj, Relation, Exists, Not
@@ -643,7 +645,7 @@
                 # so compute description manually even if there is only
                 # one solution
                 basedescr = [None] * len(plan.selected)
-                todetermine = zip(xrange(len(plan.selected)), repeat(False))
+                todetermine = zip(range(len(plan.selected)), repeat(False))
                 descr = _build_descr(cnx, results, basedescr, todetermine)
             # FIXME: get number of affected entities / relations on non
             # selection queries ?
@@ -670,7 +672,7 @@
     unstables = rqlst.get_variable_indices()
     basedescr = []
     todetermine = []
-    for i in xrange(len(rqlst.children[0].selection)):
+    for i in range(len(rqlst.children[0].selection)):
         ttype = _selection_idx_type(i, rqlst, args)
         if ttype is None or ttype == 'Any':
             ttype = None