diff options
author | Sakthipriyan Vairamani (thefourtheye) <thechargingvolcano@gmail.com> | 2019-01-19 15:44:37 +0530 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-01-28 12:24:38 +0100 |
commit | 48149876dd195bb2bb072a1d8b1cb3ef0b9ae15d (patch) | |
tree | 8808496071fc8ca41bf0c826f3115690daa5843c /tools/mkssldef.py | |
parent | 953dae132d1d7c7321ae0ab6a23b691450c1bd8a (diff) | |
download | android-node-v8-48149876dd195bb2bb072a1d8b1cb3ef0b9ae15d.tar.gz android-node-v8-48149876dd195bb2bb072a1d8b1cb3ef0b9ae15d.tar.bz2 android-node-v8-48149876dd195bb2bb072a1d8b1cb3ef0b9ae15d.zip |
tools: make mkssldef.py Python 3 compatible
This patch replaces the usage of `map` in such a way that it will be
compatible with Python 3.
PR-URL: https://github.com/nodejs/node/pull/25584
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'tools/mkssldef.py')
-rwxr-xr-x | tools/mkssldef.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/mkssldef.py b/tools/mkssldef.py index 3ff5353166..4768d1ff0f 100755 --- a/tools/mkssldef.py +++ b/tools/mkssldef.py @@ -21,13 +21,13 @@ if __name__ == '__main__': elif option.startswith('-X'): excludes += option[2:].split(',') elif option.startswith('-B'): bases += option[2:].split(',') - excludes = map(re.compile, excludes) + excludes = [re.compile(exclude) for exclude in excludes] exported = [] for filename in filenames: for line in open(filename).readlines(): name, _, _, meta, _ = re.split('\s+', line) - if any(map(lambda p: p.match(name), excludes)): continue + if any(p.match(name) for p in excludes): continue meta = meta.split(':') assert meta[0] in ('EXIST', 'NOEXIST') assert meta[2] in ('FUNCTION', 'VARIABLE') |