[py3k] unicode → six.text_type
authorRémi Cardona <remi.cardona@logilab.fr>
Wed, 16 Sep 2015 18:43:02 +0200
changeset 10699 9bad9e061932
parent 10698 bee7de3b4e55
child 10700 a6d9d27f4253
[py3k] unicode → six.text_type
web/views/magicsearch.py
--- a/web/views/magicsearch.py	Wed Sep 16 18:41:12 2015 +0200
+++ b/web/views/magicsearch.py	Wed Sep 16 18:43:02 2015 +0200
@@ -23,6 +23,8 @@
 import re
 from logging import getLogger
 
+from six import text_type
+
 from yams.interfaces import IVocabularyConstraint
 
 from rql import RQLSyntaxError, BadRQLQuery, parse
@@ -386,7 +388,7 @@
         self.processors = sorted(processors, key=lambda x: x.priority)
 
     def process_query(self, uquery):
-        assert isinstance(uquery, unicode)
+        assert isinstance(uquery, text_type)
         try:
             procname, query = uquery.split(':', 1)
             proc = self.by_name[procname.strip().lower()]