rset.py
changeset 10687 d394bfcd8c25
parent 10662 10942ed172de
child 10691 af266f27c4d5
--- a/rset.py	Mon Oct 05 17:10:36 2015 +0200
+++ b/rset.py	Wed Sep 16 11:28:07 2015 +0200
@@ -21,6 +21,7 @@
 
 from warnings import warn
 
+from six import PY3
 from six.moves import range
 
 from logilab.common import nullobject
@@ -375,6 +376,8 @@
             warn('[3.21] the "encoded" argument is deprecated', DeprecationWarning)
         encoding = self.req.encoding
         rqlstr = self.syntax_tree().as_string(kwargs=self.args)
+        if PY3:
+            return rqlstr
         # sounds like we get encoded or unicode string due to a bug in as_string
         if not encoded:
             if isinstance(rqlstr, unicode):