summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGaurav Juvekar <gauravjuvekar@gmail.com>2017-03-26 10:29:59 (GMT)
committerGaurav Juvekar <gauravjuvekar@gmail.com>2017-03-26 10:29:59 (GMT)
commit916e4fa90ee512fedeba05665fb357ffd208319c (patch)
tree0b9053aaf4ef8c02d4b585795925b4a087ee1071 /src
parentfc30b315d34d164a47e35e8a8ac5333f0c395768 (diff)
downloadSCons-916e4fa90ee512fedeba05665fb357ffd208319c.zip
SCons-916e4fa90ee512fedeba05665fb357ffd208319c.tar.gz
SCons-916e4fa90ee512fedeba05665fb357ffd208319c.tar.bz2
string-escape unicode characters while printing --tree
Fixes #2910
Diffstat (limited to 'src')
-rw-r--r--src/engine/SCons/Util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py
index a8a6990..ecdd77f 100644
--- a/src/engine/SCons/Util.py
+++ b/src/engine/SCons/Util.py
@@ -148,7 +148,7 @@ class NodeList(UserList):
# else:
# self.data = [ initlist,]
-
+
def __nonzero__(self):
return len(self.data) != 0
@@ -170,10 +170,10 @@ class NodeList(UserList):
return self.__class__(result)
def __getitem__(self, index):
- """
+ """
This comes for free on py2,
but py3 slices of NodeList are returning a list
- breaking slicing nodelist and refering to
+ breaking slicing nodelist and refering to
properties and methods on contained object
"""
# return self.__class__(self.data[index])
@@ -288,7 +288,7 @@ def print_tree(root, child_func, prune=0, showtags=0, margin=[0], visited=None):
or in the whole tree if prune.
"""
- rname = str(root)
+ rname = str(root).encode('string-escape')
# Initialize 'visited' dict, if required
if visited is None: