schema.py
changeset 10791 22611236983d
parent 10689 49a62b8f6d43
child 10797 b4f8c0b98c29
--- a/schema.py	Tue Oct 13 16:12:37 2015 +0200
+++ b/schema.py	Wed Oct 14 15:49:03 2015 +0200
@@ -25,7 +25,7 @@
 from logging import getLogger
 from warnings import warn
 
-from six import text_type, string_types, add_metaclass
+from six import PY2, text_type, string_types, add_metaclass
 from six.moves import range
 
 from logilab.common import tempattr
@@ -146,7 +146,7 @@
     added/removed for instance)
     """
     union = parse(u'Any 1 WHERE %s' % rqlstring).as_string()
-    if isinstance(union, str):
+    if PY2 and isinstance(union, str):
         union = union.decode('utf-8')
     return union.split(' WHERE ', 1)[1]