Update for python3.
This fixes all of the problems with our kernel scripts, but not
the clang python script problems.
I also removed the updateGitFiles function since that code was
just silently failing any way. I replaced all calls with updateFiles.
Test: Ran script using python2 to verify it still works.
Test: Run script in python3 verifying that it starts to run.
Change-Id: I223a31a8324c59e6bc4067f48a6110361b3e26e8
diff --git a/libc/kernel/tools/clean_header.py b/libc/kernel/tools/clean_header.py
index f86d36e..cfd301a 100755
--- a/libc/kernel/tools/clean_header.py
+++ b/libc/kernel/tools/clean_header.py
@@ -127,7 +127,7 @@
if __name__ == "__main__":
def usage():
- print """\
+ print("""\
usage: %s [options] <header_path>
options:
@@ -142,7 +142,7 @@
-d<path> specify path of cleaned kernel headers
<header_path> must be in a subdirectory of 'original'
- """ % os.path.basename(sys.argv[0])
+ """ % os.path.basename(sys.argv[0]))
sys.exit(1)
try:
@@ -211,9 +211,8 @@
else:
r = "added"
- print "cleaning: %-*s -> %-*s (%s)" % (35, path, 35, path, r)
+ print("cleaning: %-*s -> %-*s (%s)" % (35, path, 35, path, r))
-
- b.updateGitFiles()
+ b.updateFiles()
sys.exit(0)