summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2015-05-26 19:54:35 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2015-05-26 19:54:35 (GMT)
commite07f6573ca57ba9e27ad86377e81605b507ab190 (patch)
tree61e2e52c1229bd4b4b925cd77b0b67b5c9bfcf6e
parentf0a8c4f4aea84a6a49ff087b87cc2a6c4a12f148 (diff)
parentcd88c2ae35ff11b6565dcb8c7b0a0c1985346f51 (diff)
downloadSCons-e07f6573ca57ba9e27ad86377e81605b507ab190.zip
SCons-e07f6573ca57ba9e27ad86377e81605b507ab190.tar.gz
SCons-e07f6573ca57ba9e27ad86377e81605b507ab190.tar.bz2
Merged in techtonik/scons (pull request #235)
Fix --tree=all print when build tree contains non-ascii Node representation
-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: