web/controller.py
changeset 10698 bee7de3b4e55
parent 10663 54b8a1f249fb
child 10907 9ae707db5265
--- a/web/controller.py	Wed Sep 16 18:40:03 2015 +0200
+++ b/web/controller.py	Wed Sep 16 18:41:12 2015 +0200
@@ -19,6 +19,8 @@
 
 __docformat__ = "restructuredtext en"
 
+from six import PY2
+
 from logilab.mtconverter import xml_escape
 from logilab.common.registry import yes
 from logilab.common.deprecation import deprecated
@@ -87,7 +89,7 @@
         rql = req.form.get('rql')
         if rql:
             req.ensure_ro_rql(rql)
-            if not isinstance(rql, unicode):
+            if PY2 and not isinstance(rql, unicode):
                 rql = unicode(rql, req.encoding)
             pp = req.vreg['components'].select_or_none('magicsearch', req)
             if pp is not None: