# HG changeset patch # User Rémi Cardona # Date 1442926876 -7200 # Node ID 6ca54ea4ba4ddcdf89f16cd627bf0e0a6e49f7e0 # Parent 48c6de7321d81621f1c4d70866810c5b7c05bde6 [py3k] unicode → six.text_type diff -r 48c6de7321d8 -r 6ca54ea4ba4d 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