[py3k] unicode → six.text_type
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 22 Sep 2015 15:01:16 +0200
changeset 10729 6ca54ea4ba4d
parent 10728 48c6de7321d8
child 10730 874ac29b515d
[py3k] unicode → six.text_type
web/views/ajaxcontroller.py
--- a/web/views/ajaxcontroller.py	Tue Sep 22 15:00:41 2015 +0200
+++ b/web/views/ajaxcontroller.py	Tue Sep 22 15:01:16 2015 +0200
@@ -66,6 +66,8 @@
 from warnings import warn
 from functools import partial
 
+from six import text_type
+
 from logilab.common.date import strptime
 from logilab.common.registry import yes
 from logilab.common.deprecation import deprecated
@@ -150,7 +152,7 @@
         if result is None:
             return ''
         # get unicode on @htmlize methods, encoded string on @jsonize methods
-        elif isinstance(result, unicode):
+        elif isinstance(result, text_type):
             return result.encode(self._cw.encoding)
         return result