diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-12 22:46:25 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-12 22:46:25 (GMT) |
commit | 5304f2d061f336e7ee6dcc45b07d4271fb6be21f (patch) | |
tree | 377697be1cddf7f37d10ceb5be19120720fc1e7f | |
parent | 8bbebd78a9c00d713f3b53d5e3bbd1df28cb2e74 (diff) | |
download | SCons-5304f2d061f336e7ee6dcc45b07d4271fb6be21f.zip SCons-5304f2d061f336e7ee6dcc45b07d4271fb6be21f.tar.gz SCons-5304f2d061f336e7ee6dcc45b07d4271fb6be21f.tar.bz2 |
fix rb/wb py2/3
-rw-r--r-- | test/Command.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/Command.py b/test/Command.py index 5f72c94..49b9117 100644 --- a/test/Command.py +++ b/test/Command.py @@ -35,8 +35,8 @@ test.subdir('sub') test.write('build.py', r""" import sys -contents = open(sys.argv[2], 'rb').read() -file = open(sys.argv[1], 'wb') +contents = open(sys.argv[2], 'r').read() +file = open(sys.argv[1], 'w') file.write(contents) file.close() """) @@ -45,8 +45,8 @@ test.write('SConstruct', """ import os def buildIt(env, target, source): - contents = open(str(source[0]), 'rb').read() - file = open(str(target[0]), 'wb') + contents = open(str(source[0]), 'r').read() + file = open(str(target[0]), 'w') xyzzy = env.get('XYZZY', '') if xyzzy: file.write(xyzzy + '\\n') @@ -57,9 +57,9 @@ def buildIt(env, target, source): def sub(env, target, source): target = str(target[0]) source = str(source[0]) - t = open(target, 'wb') + t = open(target, 'w') for f in sorted(os.listdir(source)): - t.write(open(os.path.join(source, f), 'rb').read()) + t.write(open(os.path.join(source, f), 'r').read()) t.close() return 0 |