diff options
| author | Serge Guelton <sguelton@redhat.com> | 2019-03-21 07:19:09 +0000 |
|---|---|---|
| committer | Serge Guelton <sguelton@redhat.com> | 2019-03-21 07:19:09 +0000 |
| commit | 32cffcf1aba9e5ac3315556b852e9c8ea6da64e7 (patch) | |
| tree | e8bf3aae50d6306224b89993d01030b2e8fae90c /lldb/scripts/swig_bot_lib | |
| parent | 8de7bc0bff05a5d5bc5d8849687993234f5e0ea9 (diff) | |
| download | bcm5719-llvm-32cffcf1aba9e5ac3315556b852e9c8ea6da64e7.tar.gz bcm5719-llvm-32cffcf1aba9e5ac3315556b852e9c8ea6da64e7.zip | |
Use list comprehension instead of map/filter to prepare Python2/3 compat
Differential Revision: https://reviews.llvm.org/D59579
llvm-svn: 356647
Diffstat (limited to 'lldb/scripts/swig_bot_lib')
| -rw-r--r-- | lldb/scripts/swig_bot_lib/local.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/scripts/swig_bot_lib/local.py b/lldb/scripts/swig_bot_lib/local.py index b26ea2f53ea..ea073af8257 100644 --- a/lldb/scripts/swig_bot_lib/local.py +++ b/lldb/scripts/swig_bot_lib/local.py @@ -54,10 +54,8 @@ def pack_archive(bytes_io, src_root, filters): full_path = os.path.normpath(os.path.join(src_root, subfolder)) candidates = [os.path.normpath(os.path.join(full_path, f)) for f in os.listdir(full_path)] - actual = filter( - lambda f: os.path.isfile(f) and os.path.splitext(f)[1] == ext, - candidates) - return (subfolder, map(lambda f: os.path.basename(f), actual)) + actual = [f for f in candidates if os.path.isfile(f) and os.path.splitext(f)[1] == ext] + return (subfolder, [os.path.basename(f) for f in actual]) archive_entries = map(filter_func, filters) else: for (root, dirs, files) in os.walk(src_root): |

