From 48149876dd195bb2bb072a1d8b1cb3ef0b9ae15d Mon Sep 17 00:00:00 2001 From: "Sakthipriyan Vairamani (thefourtheye)" Date: Sat, 19 Jan 2019 15:44:37 +0530 Subject: [PATCH] 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 Reviewed-By: Ben Noordhuis --- tools/mkssldef.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mkssldef.py b/tools/mkssldef.py index 3ff53531667417..4768d1ff0ff699 100755 --- a/tools/mkssldef.py +++ b/tools/mkssldef.py @@ -21,13 +21,13 @@ 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')