summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Galazin <alexander.galazin@arm.com>2019-05-10 12:06:12 +0200
committerAlexander Galazin <alexander.galazin@arm.com>2019-05-10 12:47:39 +0200
commit9c4f100a056b084876e874a1b115192225b9a61a (patch)
treec25a924bb275a03f7cd2ceeb0e7391ce6fe2cac9 /scripts
parentd6f7f2c0e54770f1e5d9f7ebc73181c74facde68 (diff)
downloadVK-GL-CTS-9c4f100a056b084876e874a1b115192225b9a61a.tar.gz
VK-GL-CTS-9c4f100a056b084876e874a1b115192225b9a61a.tar.bz2
VK-GL-CTS-9c4f100a056b084876e874a1b115192225b9a61a.zip
Update fetch_sources.py to Python 3
Components: Framework Change-Id: I7f75a084e5128b1a19be7649a06a315e91a36688
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/common.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/build/common.py b/scripts/build/common.py
index d85f610f7..cb17a239f 100644
--- a/scripts/build/common.py
+++ b/scripts/build/common.py
@@ -87,12 +87,23 @@ def execute (args):
if retcode != 0:
raise Exception("Failed to execute '%s', got %d" % (str(args), retcode))
+def readBinaryFile (filename):
+ f = open(filename, 'rb')
+ data = f.read()
+ f.close()
+ return data
+
def readFile (filename):
f = open(filename, 'rt')
data = f.read()
f.close()
return data
+def writeBinaryFile (filename, data):
+ f = open(filename, 'wb')
+ f.write(data)
+ f.close()
+
def writeFile (filename, data):
f = open(filename, 'wt')
f.write(data)