From 8a2810fd8d63bd313a719ea32f2da527f7768ffa Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 1 Sep 2020 18:46:59 -0300 Subject: [PATCH] Added support to remove the filters of the internal BoM. --- kibot/bom/bom.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/kibot/bom/bom.py b/kibot/bom/bom.py index 4f3f76c5..d62bb329 100644 --- a/kibot/bom/bom.py +++ b/kibot/bom/bom.py @@ -363,10 +363,15 @@ def group_components(cfg, components): def do_bom(file_name, ext, comps, cfg): # Apply all the filters - for c in comps: - c.in_bom = cfg.exclude_filter.filter(c) - c.fitted = cfg.dnf_filter.filter(c) - c.fixed = cfg.dnc_filter.filter(c) + if cfg.exclude_filter: + for c in comps: + c.in_bom = cfg.exclude_filter.filter(c) + if cfg.dnf_filter: + for c in comps: + c.fitted = cfg.dnf_filter.filter(c) + if cfg.dnc_filter: + for c in comps: + c.fixed = cfg.dnc_filter.filter(c) # Apply the variant cfg.variant.filter(comps) # Group components according to group_fields