py3: update all the things
Change-Id: I5e11b46b7c2f7f8760d6c0e713ca99c1e88b7cd3
diff --git a/tools/findleaves.py b/tools/findleaves.py
index 3a9e508..d97ed74 100755
--- a/tools/findleaves.py
+++ b/tools/findleaves.py
@@ -20,12 +20,14 @@
# the search in a given subdirectory when the file is found.
#
+from __future__ import print_function
+
import os
import sys
def perform_find(mindepth, prune, dirlist, filename):
result = []
- pruneleaves = set(map(lambda x: os.path.split(x)[1], prune))
+ pruneleaves = set([os.path.split(x)[1] for x in prune])
for rootdir in dirlist:
rootdepth = rootdir.count("/")
for root, dirs, files in os.walk(rootdir, followlinks=True):
@@ -92,7 +94,7 @@
results = list(set(perform_find(mindepth, prune, dirlist, filename)))
results.sort()
for r in results:
- print r
+ print(r)
if __name__ == "__main__":
main(sys.argv)