summaryrefslogtreecommitdiff
path: root/scripts/khr_util/format.py
diff options
context:
space:
mode:
authorPyry Haulos <phaulos@google.com>2016-11-17 15:26:29 -0800
committerPyry Haulos <phaulos@google.com>2016-11-17 15:26:29 -0800
commitca801e7ccee6dc0bff4b42a9fdaeed75a4f35656 (patch)
treea5836ea9ae23ab5ad804d8b9c09b1aa0d05a744a /scripts/khr_util/format.py
parent44edd7bbab02f270f64415ba0e889795c848a873 (diff)
downloadVK-GL-CTS-ca801e7ccee6dc0bff4b42a9fdaeed75a4f35656.tar.gz
VK-GL-CTS-ca801e7ccee6dc0bff4b42a9fdaeed75a4f35656.tar.bz2
VK-GL-CTS-ca801e7ccee6dc0bff4b42a9fdaeed75a4f35656.zip
Add eglw.h wrapper for legacy code
eglw.h is a wrapper that allows supporting legacy EGL code that has been written against egl.h. Change-Id: I40e47e53c75cbc523f189adeefe0f3616e21d5ca
Diffstat (limited to 'scripts/khr_util/format.py')
-rw-r--r--scripts/khr_util/format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/khr_util/format.py b/scripts/khr_util/format.py
index 15efdea2f..6d0e4f765 100644
--- a/scripts/khr_util/format.py
+++ b/scripts/khr_util/format.py
@@ -20,6 +20,7 @@
#
#-------------------------------------------------------------------------
+import os
from itertools import chain
INL_HEADER_TMPL = """\
@@ -77,8 +78,7 @@ def readFile (filename):
return data
def writeFileIfChanged (filename, data):
- oldData = readFile(filename)
- if data != oldData:
+ if not os.path.exists(filename) or readFile(filename) != data:
f = open(filename, 'wb')
f.write(data)
f.close()