Skip to content
Snippets Groups Projects
Commit 3d1d4fe2 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

scripts: switch update-project-files.py to Python3

parent 97aa3dff
No related branches found
No related tags found
No related merge requests found
Pipeline #88731 passed
#!/usr/bin/python -Es
#!/usr/bin/env python3
# vim: et:sw=4:ts=4:sts=4
#
# Script regenerates project file list from the list of files tracked by Git.
......@@ -28,13 +28,13 @@ def run(command):
raise Exception("Command %s failed.", command)
return out
print >>sys.stderr, "Updating %s." % OUTPUT_FILE
print("Updating %s." % OUTPUT_FILE, file=sys.stderr)
git_root = run(["git", "rev-parse", "--show-toplevel"]).strip()
os.chdir(git_root)
command = ["git", "ls-files"] + SOURCES
files = run(command).splitlines() + SOURCES_EXTRA
files = run(command).decode("utf-8").splitlines() + SOURCES_EXTRA
with open(OUTPUT_FILE, "w") as output:
output.write("\n".join(sorted(files)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment