aboutsummaryrefslogtreecommitdiff
path: root/src/ee/kicad
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/kicad')
-rw-r--r--src/ee/kicad/model.py2
-rw-r--r--src/ee/kicad/to_bom.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ee/kicad/model.py b/src/ee/kicad/model.py
index b230f94..a9b0c02 100644
--- a/src/ee/kicad/model.py
+++ b/src/ee/kicad/model.py
@@ -22,6 +22,8 @@ class ComponentField(object):
names = ["Reference", "Value", "Footprint", "Datasheet"]
def __init__(self, index, name, value, position):
+ value = value.strip() if value and len(value.strip()) > 0 else None
+
self._index = index
self._name = name if index >= len(ComponentField.names) else ComponentField.names[index]
self._value = value
diff --git a/src/ee/kicad/to_bom.py b/src/ee/kicad/to_bom.py
index ecab211..9a4f950 100644
--- a/src/ee/kicad/to_bom.py
+++ b/src/ee/kicad/to_bom.py
@@ -5,7 +5,7 @@ __all__ = ["to_bom"]
def simple_element(parent, e, text):
- if len(text) == 0:
+ if not text or len(text) == 0:
return
element = Element(e)
element.text = text