Skip to content

Commit

Permalink
introspection: drop support for interface filtering
Browse files Browse the repository at this point in the history
This is dead code, and ruff doesn't like its use of lambda.
  • Loading branch information
allisonkarlitskaya committed Jun 22, 2023
1 parent 7f7cfe6 commit b662aef
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/systemd_ctypes/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,9 @@ def parse_interface(interface):
}


def parse_xml(xml, interface_names=None):
def parse_xml(xml):
et = ET.fromstring(xml)

if interface_names is not None:
predicate = lambda tag: tag.attrib['name'] in interface_names
else:
predicate = lambda tag: True

return {tag.attrib['name']: parse_interface(tag) for tag in et.findall('interface') if predicate(tag)}
return {tag.attrib['name']: parse_interface(tag) for tag in et.findall('interface')}


# Pretend like this is a little bit functional
Expand Down

0 comments on commit b662aef

Please sign in to comment.