From e9c61517581f4fc0299b81c4e6bb9069dab3b934 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Tue, 28 Feb 2017 12:18:49 -0800 Subject: fix binary/non-binary file writes where appropriate, previous all were binary. py2/3 --- QMTest/TestSCons_time.py | 4 ++-- src/script/scons-time.py | 2 +- 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): -- cgit v0.12