summaryrefslogtreecommitdiff
path: root/libc/kernel/tools/clean_header.py
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2021-04-19 13:50:16 -0700
committerChristopher Ferris <cferris@google.com>2021-04-19 17:02:38 -0700
commitac7ec11473f9573750d429f066adda1c2b928212 (patch)
tree68cea0125493a8d944a8cae247f20276391acfe3 /libc/kernel/tools/clean_header.py
parentb82fcdaf36d6a48e56c9849f06bb5f2bc019a0b2 (diff)
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
Diffstat (limited to 'libc/kernel/tools/clean_header.py')
-rwxr-xr-xlibc/kernel/tools/clean_header.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/libc/kernel/tools/clean_header.py b/libc/kernel/tools/clean_header.py
index f86d36e4e..cfd301ad2 100755
--- a/libc/kernel/tools/clean_header.py
+++ b/libc/kernel/tools/clean_header.py
@@ -127,7 +127,7 @@ def cleanupFile(dst_file, src_file, rel_path, no_update = True):
if __name__ == "__main__":
def usage():
- print """\
+ print("""\
usage: %s [options] <header_path>
options:
@@ -142,7 +142,7 @@ if __name__ == "__main__":
-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 @@ if __name__ == "__main__":
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)