summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-02-28 20:18:49 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-02-28 20:18:49 (GMT)
commite9c61517581f4fc0299b81c4e6bb9069dab3b934 (patch)
tree44636ffa20faae9307b2e840fd7f033c34b05665
parentb8326ebfe788f9f165773cd4b2e649b6951a6e26 (diff)
downloadSCons-e9c61517581f4fc0299b81c4e6bb9069dab3b934.zip
SCons-e9c61517581f4fc0299b81c4e6bb9069dab3b934.tar.gz
SCons-e9c61517581f4fc0299b81c4e6bb9069dab3b934.tar.bz2
fix binary/non-binary file writes where appropriate, previous all were binary. py2/3
-rw-r--r--QMTest/TestSCons_time.py4
-rw-r--r--src/script/scons-time.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/QMTest/TestSCons_time.py b/QMTest/TestSCons_time.py
index 6778d1b..a9212f7 100644
--- a/QMTest/TestSCons_time.py
+++ b/QMTest/TestSCons_time.py
@@ -246,7 +246,7 @@ class TestSCons_time(TestCommon):
d, f = os.path.split(path)
if not os.path.isdir(d):
os.makedirs(d)
- open(path, 'wb').write(content)
+ open(path, 'w').write(content)
return dir
def write_sample_tarfile(self, archive, dir, files):
@@ -296,7 +296,7 @@ class TestSCons_time(TestCommon):
zip = zipfile.ZipFile(archive, 'w')
for name, content in files:
path = os.path.join(dir, name)
- open(path, 'wb').write(content)
+ open(path, 'w').write(content)
zip.write(path)
zip.close()
shutil.rmtree(dir)
diff --git a/src/script/scons-time.py b/src/script/scons-time.py
index 9faf045..c788e50 100644
--- a/src/script/scons-time.py
+++ b/src/script/scons-time.py
@@ -248,7 +248,7 @@ def unzip(fname):
os.makedirs(dir)
except:
pass
- open(name, 'w').write(zf.read(name))
+ open(name, 'wb').write(zf.read(name))
def read_tree(dir):
for dirpath, dirnames, filenames in os.walk(dir):