summaryrefslogtreecommitdiff
path: root/QMTest
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-02-28 12:08:24 -0800
committerWilliam Deegan <bill@baddogconsulting.com>2017-02-28 12:08:24 -0800
commitdcf98254d6eff4e91c0b6ba7d872bc9f65484f49 (patch)
tree80318379575906bfb62fa15b5501a15c3672d496 /QMTest
parent4c8707e98753e384ece038cf14d19bab6b728117 (diff)
downloadscons-dcf98254d6eff4e91c0b6ba7d872bc9f65484f49.tar.gz
py2/3 fixes
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestSCons_time.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/QMTest/TestSCons_time.py b/QMTest/TestSCons_time.py
index ba7fbd8d..6778d1b2 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