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>
This commit is contained in:
parent
953dae132d
commit
48149876dd
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user