diff --git a/build-scripts/compose_ds.py b/build-scripts/compose_ds.py index 42d0dfea9f8..6826be50c94 100755 --- a/build-scripts/compose_ds.py +++ b/build-scripts/compose_ds.py @@ -33,7 +33,8 @@ def mangle_path(path): # From the list generated by collect_sce_checks, extract the path to the check content, # and embed the script into the data stream -def embed_sce_checks_in_datastream(datastreamtree, checklists, checks, sce_files, build_dir): +def embed_sce_checks_in_datastream(datastreamtree, checklists, checks, build_dir): + sce_files = collect_sce_checks(datastreamtree) for file in sce_files: path = os.path.join(build_dir, file) mangled_path = mangle_path(file) @@ -259,8 +260,7 @@ def compose_ds( add_component(ds_collection, checks, ocil_file_name) add_component(ds_collection, checks, cpe_oval_file_name) if sce_enabled: - sce_check_files = collect_sce_checks(ds_collection) - embed_sce_checks_in_datastream(ds_collection, checklists, checks, sce_check_files, build_dir) + embed_sce_checks_in_datastream(ds_collection, checklists, checks, build_dir) if hasattr(ET, "indent"): ET.indent(ds_collection, space=" ", level=0)