Skip to content

Commit

Permalink
Merge pull request #22 from INTI-CMNB/add_exclude_from_bom
Browse files Browse the repository at this point in the history
Exclude components marked as "Exclude from BoM"
  • Loading branch information
set-soft authored Nov 30, 2023
2 parents 5417e49 + 81ac05b commit 0beae56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kibom/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ def isFitted(self):
# First, check for the 'dnp' attribute (added in KiCad 7.0)
for child in self.element.getChildren():
if child.name == 'property':
if child.attributes.get('name', '').lower() == 'dnp':
name = child.attributes.get('name', '').lower()
if name == 'dnp' or name == 'exclude_from_bom':
return False

# Check the value field first
Expand Down

0 comments on commit 0beae56

Please sign in to comment.