summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/engine/SCons/Util.py4
-rw-r--r--test/option--tree.py15
3 files changed, 19 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index ef4e016..42108de 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -34,6 +34,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- Show --config choices if no argument is specified (PR #202).
- Fixed build crash when XML toolchain isn't installed, and
activated compression for ZIP archives.
+ - Fixed --tree=all print when build tree contains non-ascii
+ Node representation (PR #235).
From Alexandre Feblot:
- Fix for VersionedSharedLibrary under 'sunos' platform.
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py
index 822d524..6dd64ec 100644
--- a/src/engine/SCons/Util.py
+++ b/src/engine/SCons/Util.py
@@ -264,10 +264,10 @@ def print_tree(root, child_func, prune=0, showtags=0, margin=[0], visited={}):
children = child_func(root)
if prune and rname in visited and children:
- sys.stdout.write(''.join(tags + margins + ['+-[', rname, ']']) + u'\n')
+ sys.stdout.write(''.join(tags + margins + ['+-[', rname, ']']) + '\n')
return
- sys.stdout.write(''.join(tags + margins + ['+-', rname]) + u'\n')
+ sys.stdout.write(''.join(tags + margins + ['+-', rname]) + '\n')
visited[rname] = 1
diff --git a/test/option--tree.py b/test/option--tree.py
index a50433c..519ebe3 100644
--- a/test/option--tree.py
+++ b/test/option--tree.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
#
# __COPYRIGHT__
#
@@ -51,6 +52,20 @@ scons: warning: The --debug=tree option is deprecated; please use --tree=all ins
""",
status = 0, match=TestSCons.match_re_dotall)
+
+# Check that printing nodes won't fail with
+# UnicodeDecodeError: 'ascii' codec ... ordinal not in range(128)
+# https://bitbucket.org/scons/scons/pull-request/235
+
+test.write('SConstruct', """\
+# -*- coding: utf-8 -*-
+
+Entry('русский юникод')
+""")
+
+test.run(arguments = '-Q --tree=all')
+
+
test.pass_test()
# Local Variables: