Skip to content

tools: make mkssldef.py Python 3 compatible #25584

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/mkssldef.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down