[py3k] unicode → six.text_type
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 22 Sep 2015 14:42:33 +0200
changeset 10727 3fb9111d521f
parent 10726 bb91f581c389
child 10728 48c6de7321d8
[py3k] unicode → six.text_type
web/views/navigation.py
--- a/web/views/navigation.py	Tue Sep 22 10:24:47 2015 +0200
+++ b/web/views/navigation.py	Tue Sep 22 14:42:33 2015 +0200
@@ -50,6 +50,8 @@
 
 from datetime import datetime
 
+from six import text_type
+
 from rql.nodes import VariableRef, Constant
 
 from logilab.mtconverter import xml_escape
@@ -192,10 +194,10 @@
                 return entity.printable_value(attrname, format='text/plain')
         elif col is None: # smart links disabled.
             def index_display(row):
-                return unicode(row)
+                return text_type(row)
         elif self._cw.vreg.schema.eschema(rset.description[0][col]).final:
             def index_display(row):
-                return unicode(rset[row][col])
+                return text_type(rset[row][col])
         else:
             def index_display(row):
                 return rset.get_entity(row, col).view('text')