Convert findleaves.py to python 3

Kati special-cases findleaves.py to an internal
C++ implementation, so I don't think this python
script is even used. Update it anyways, and
test by manually running findleaves.py.

Bug: 203436762
Test: ./build/make/tools/findleaves.py --mindepth=2 --dir=build/make/target Android.mk
Change-Id: If27cc37d8f673388c0e31b9491e792b98ca59da4
This commit is contained in:
Cole Faust 2022-10-24 17:57:39 -07:00
parent 3946ea0318
commit 407d214b0d

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# #
# Copyright (C) 2009 The Android Open Source Project # Copyright (C) 2009 The Android Open Source Project
# #
@ -121,7 +121,7 @@ def main(argv):
results = list(set(perform_find(mindepth, prune, dirlist, filenames))) results = list(set(perform_find(mindepth, prune, dirlist, filenames)))
results.sort() results.sort()
for r in results: for r in results:
print r print(r)
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv) main(sys.argv)