From 349dbb98a6fc13a37e1ca8d59250282950be36fd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 4 May 2023 08:48:39 +0200 Subject: [PATCH] bom_csv_grouped_by_value_with_fp.py: fix compatibility with python < 3.9 From master branch --- .../python_scripts/bom_csv_grouped_by_value_with_fp.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eeschema/plugins/python_scripts/bom_csv_grouped_by_value_with_fp.py b/eeschema/plugins/python_scripts/bom_csv_grouped_by_value_with_fp.py index 9d902377b4..0d311aa011 100644 --- a/eeschema/plugins/python_scripts/bom_csv_grouped_by_value_with_fp.py +++ b/eeschema/plugins/python_scripts/bom_csv_grouped_by_value_with_fp.py @@ -62,12 +62,11 @@ for group in grouped: # 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 += fromNetlistText( component.getRef() ) + ", " + if refs != "": + refs += ", " + refs += fromNetlistText( component.getRef() ) c = component - # remove last, not needed trailing comma and whitespace - refs = refs.removesuffix(', ') - # Fill in the component groups common data out.writerow([refs, len(group), fromNetlistText( c.getValue() ),