summaryrefslogtreecommitdiff
path: root/test/Scanner
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-19 18:46:12 +0000
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-19 18:46:12 +0000
commit72d746f3e435404fbf8c414b6ae021fc42ff4052 (patch)
tree071343b7117a42f07ac9b23893454159ee14fc60 /test/Scanner
parent6566f56b24800615142e652c9273f733d9e0f008 (diff)
parente49851522a4791eef704a80be4710cb15843ad8e (diff)
downloadscons-72d746f3e435404fbf8c414b6ae021fc42ff4052.tar.gz
Merged in bdbaddog/scons (pull request #419)
More py2/py3 fixes.
Diffstat (limited to 'test/Scanner')
-rw-r--r--test/Scanner/unicode.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Scanner/unicode.py b/test/Scanner/unicode.py
index 2737f7db..c6985322 100644
--- a/test/Scanner/unicode.py
+++ b/test/Scanner/unicode.py
@@ -56,6 +56,8 @@ def process(outfp, infile):
contents = contents[len(codecs.BOM_UTF16_LE):].decode('utf-16-le')
elif contents.startswith(codecs.BOM_UTF16_BE):
contents = contents[len(codecs.BOM_UTF16_BE):].decode('utf-16-be')
+ else:
+ contents = contents.decode('ascii')
for line in contents.split('\n')[:-1]:
if line[:8] == 'include ':
process(outfp, line[8:])
@@ -65,7 +67,7 @@ def process(outfp, infile):
else:
outfp.write(line + '\n')
-output = open(sys.argv[2], 'wb')
+output = open(sys.argv[2], 'w')
process(output, sys.argv[1])
sys.exit(0)