Skip to content

Commit

Permalink
refactor: simplify the build of cache of inventory definitions
Browse files Browse the repository at this point in the history
Also use set for faster read access.
  • Loading branch information
isimluk committed Oct 10, 2023
1 parent 1a2c31a commit 5b8100c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions build-scripts/cpe_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ def main():
inventory_defs.append(el)

# Keep the list of 'id' attributes from untranslated inventory def elements
inventory_defs_id_attrs = []

inventory_defs_id_attrs = set(inventory_def.get("id") for inventory_def in inventory_defs)
defs = inventory_defs
# Fill in that list
inventory_defs_id_attrs = \
[inventory_def.get("id") for inventory_def in inventory_defs]

tests = ovaltree.find("./{%s}tests" % oval_ns)
tests = ssg.build_cpe.extract_referred_nodes(defs, tests, "test_ref")
Expand Down

0 comments on commit 5b8100c

Please sign in to comment.