svgui/pyjs/pyjs.py
changeset 2434 07f48018b6f5
parent 2431 6923074540dd
child 2442 b13f021c68a5
--- a/svgui/pyjs/pyjs.py	Thu Oct 04 12:09:23 2018 +0300
+++ b/svgui/pyjs/pyjs.py	Thu Oct 04 17:24:40 2018 +0300
@@ -22,6 +22,7 @@
 from compiler import ast
 import os
 import copy
+from builtins import str as text
 from six.moves import cStringIO
 
 # the standard location for builtins (e.g. pyjslib) can be
@@ -1359,7 +1360,7 @@
             return str(node.value)
         elif isinstance(node.value, basestring):
             v = node.value
-            if isinstance(node.value, unicode):
+            if isinstance(node.value, text):
                 v = v.encode('utf-8')
             return "String('%s')" % escapejs(v)
         elif node.value is None: