web/views/csvexport.py
changeset 10609 e2d8e81bfe68
parent 10046 96f5ca0a86e5
child 10663 54b8a1f249fb
--- a/web/views/csvexport.py	Tue Sep 15 15:07:13 2015 +0200
+++ b/web/views/csvexport.py	Tue Sep 15 16:56:57 2015 +0200
@@ -20,6 +20,8 @@
 __docformat__ = "restructuredtext en"
 _ = unicode
 
+from six.moves import range
+
 from cubicweb.schema import display_name
 from cubicweb.predicates import any_rset, empty_rset
 from cubicweb.uilib import UnicodeCSVWriter
@@ -88,7 +90,7 @@
         rows_by_type = {}
         writer = self.csvwriter()
         rowdef_by_type = {}
-        for index in xrange(len(self.cw_rset)):
+        for index in range(len(self.cw_rset)):
             entity = self.cw_rset.complete_entity(index)
             if entity.e_schema not in rows_by_type:
                 rowdef_by_type[entity.e_schema] = [rs for rs, at in entity.e_schema.attribute_definitions()