aboutsummaryrefslogtreecommitdiff
path: root/src/ee/part
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-08-15 13:56:51 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-08-15 13:56:51 +0200
commit5f12ee84322731ce9b846a27852999ff219c75b5 (patch)
treea5188ca2e92060326fe7776fd7ee3ae8b3eeef89 /src/ee/part
parent7a1907ce2bd8fefd018fb65914d97482a9a88903 (diff)
downloadee-python-5f12ee84322731ce9b846a27852999ff219c75b5.tar.gz
ee-python-5f12ee84322731ce9b846a27852999ff219c75b5.tar.bz2
ee-python-5f12ee84322731ce9b846a27852999ff219c75b5.tar.xz
ee-python-5f12ee84322731ce9b846a27852999ff219c75b5.zip
kicad.dl: Always add fact-type/value for all components. Still adding
the more specific values for known part types. bom: Use the correct URI for finding the value. Don't die if a part has both value and mpn, and they reference the same part.
Diffstat (limited to 'src/ee/part')
-rw-r--r--src/ee/part/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ee/part/__init__.py b/src/ee/part/__init__.py
index deeab95..53835df 100644
--- a/src/ee/part/__init__.py
+++ b/src/ee/part/__init__.py
@@ -219,10 +219,10 @@ class Part(object):
@property
def printable_reference(self):
- for refs, value in [(self.get_schematic_references(), lambda sr: sr.referenceProp),
+ for refs, value in ((self.get_schematic_references(), lambda sr: sr.referenceProp),
(self.get_part_references(), lambda pr: pr.part_uriProp),
(self.get_mpns(), lambda mpn: mpn.valueProp),
- (self.get_spns(), lambda spn: spn.valueProp)]:
+ (self.get_spns(), lambda spn: spn.valueProp)):
ref = next(iter(refs), None)
if ref:
return value(ref)