Skip to content

Commit e6ad7f4

Browse files
thefourtheyeaddaleax
authored andcommitted
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: #25584 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent c7dbb72 commit e6ad7f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/mkssldef.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
elif option.startswith('-X'): excludes += option[2:].split(',')
2222
elif option.startswith('-B'): bases += option[2:].split(',')
2323

24-
excludes = map(re.compile, excludes)
24+
excludes = [re.compile(exclude) for exclude in excludes]
2525
exported = []
2626

2727
for filename in filenames:
2828
for line in open(filename).readlines():
2929
name, _, _, meta, _ = re.split('\s+', line)
30-
if any(map(lambda p: p.match(name), excludes)): continue
30+
if any(p.match(name) for p in excludes): continue
3131
meta = meta.split(':')
3232
assert meta[0] in ('EXIST', 'NOEXIST')
3333
assert meta[2] in ('FUNCTION', 'VARIABLE')

0 commit comments

Comments
 (0)