BOM Generation: Unifying reference concatenation using more pythonic string join to avoid trailing comma.
This commit is contained in:
committed by
Jon Evans
parent
fd91f8933e
commit
2ee75b1aec
@@ -94,16 +94,16 @@ grouped = net.groupComponents()
|
||||
index = 1
|
||||
for group in grouped:
|
||||
refs = ""
|
||||
refs_l = []
|
||||
|
||||
# Add the reference of every component in the group and keep a reference
|
||||
# to the component so that the other data can be filled in once per group
|
||||
for component in group:
|
||||
refs += component.getRef() + ", "
|
||||
refs_l.append( component.getRef() )
|
||||
c = component
|
||||
|
||||
# Remove trailing comma
|
||||
refs = refs[:-2]
|
||||
|
||||
|
||||
refs = ", ".join(refs_l)
|
||||
|
||||
# Fill in the component groups common data
|
||||
row = []
|
||||
row.append( index )
|
||||
|
||||
Reference in New Issue
Block a user