diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-02-28 20:08:24 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-02-28 20:08:24 (GMT) |
commit | e3b86af463e2a9eef98cd7c74469a5fff96f19c9 (patch) | |
tree | 80318379575906bfb62fa15b5501a15c3672d496 /QMTest | |
parent | 9dc001124dc72907556139a3b1f61148d1e539cf (diff) | |
download | SCons-e3b86af463e2a9eef98cd7c74469a5fff96f19c9.zip SCons-e3b86af463e2a9eef98cd7c74469a5fff96f19c9.tar.gz SCons-e3b86af463e2a9eef98cd7c74469a5fff96f19c9.tar.bz2 |
py2/3 fixes
Diffstat (limited to 'QMTest')
-rw-r--r-- | QMTest/TestSCons_time.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/QMTest/TestSCons_time.py b/QMTest/TestSCons_time.py index ba7fbd8..6778d1b 100644 --- a/QMTest/TestSCons_time.py +++ b/QMTest/TestSCons_time.py @@ -28,8 +28,9 @@ __all__.extend([ 'TestSCons_time', ]) SConstruct = """\ +from __future__ import print_function import os -print "SConstruct file directory:", os.getcwd() +print("SConstruct file directory:", os.getcwd()) """ scons_py = """\ @@ -43,7 +44,7 @@ def write_args(fp, args): write_args(sys.stdout, sys.argv) for arg in sys.argv[1:]: if arg[:10] == '--profile=': - profile = open(arg[10:], 'wb') + profile = open(arg[10:], 'w') profile.write('--profile\\n') write_args(profile, sys.argv) break @@ -270,7 +271,7 @@ class TestSCons_time(TestCommon): tar = tarfile.open(archive, mode[suffix]) for name, content in files: path = os.path.join(dir, name) - open(path, 'wb').write(content) + open(path, 'wb').write(bytearray(content,'utf-8')) tarinfo = tar.gettarinfo(path, path) tarinfo.uid = 111 tarinfo.gid = 111 |