bom_csv_grouped_by_value_with_fp.py: fix compatibility with python < 3.9
From master branch
This commit is contained in:
parent
f4fa5bb0fc
commit
349dbb98a6
|
@ -62,12 +62,11 @@ for group in grouped:
|
||||||
# Add the reference of every component in the group and keep a reference
|
# 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
|
# to the component so that the other data can be filled in once per group
|
||||||
for component in group:
|
for component in group:
|
||||||
refs += fromNetlistText( component.getRef() ) + ", "
|
if refs != "":
|
||||||
|
refs += ", "
|
||||||
|
refs += fromNetlistText( component.getRef() )
|
||||||
c = component
|
c = component
|
||||||
|
|
||||||
# remove last, not needed trailing comma and whitespace
|
|
||||||
refs = refs.removesuffix(', ')
|
|
||||||
|
|
||||||
# Fill in the component groups common data
|
# Fill in the component groups common data
|
||||||
out.writerow([refs, len(group),
|
out.writerow([refs, len(group),
|
||||||
fromNetlistText( c.getValue() ),
|
fromNetlistText( c.getValue() ),
|
||||||
|
|
Loading…
Reference in New Issue