rqlrewrite.py
changeset 10612 84468b90e9c1
parent 10588 fdaa0e4b7eaf
child 10662 10942ed172de
--- a/rqlrewrite.py	Wed Sep 16 11:23:51 2015 +0200
+++ b/rqlrewrite.py	Mon Sep 14 16:03:07 2015 +0200
@@ -22,6 +22,8 @@
 """
 __docformat__ = "restructuredtext en"
 
+from six import string_types
+
 from rql import nodes as n, stmts, TypeResolverException
 from rql.utils import common_parent
 
@@ -883,7 +885,7 @@
                 return n.Constant(vi['const'], 'Int')
             return n.VariableRef(stmt.get_variable(selectvar))
         vname_or_term = self._get_varname_or_term(node.name)
-        if isinstance(vname_or_term, basestring):
+        if isinstance(vname_or_term, string_types):
             return n.VariableRef(stmt.get_variable(vname_or_term))
         # shared term
         return vname_or_term.copy(stmt)