From 1dcd442156c5316fae8b9971b65543017e3baf59 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 2 Nov 2019 09:27:50 +0100 Subject: [PATCH] minor fix in a python script (kicad_netlist_reader.py) Sort lists was incorrectly made. --- eeschema/plugins/python_scripts/kicad_netlist_reader.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eeschema/plugins/python_scripts/kicad_netlist_reader.py b/eeschema/plugins/python_scripts/kicad_netlist_reader.py index f7a83abea4..bf0ed22cb3 100644 --- a/eeschema/plugins/python_scripts/kicad_netlist_reader.py +++ b/eeschema/plugins/python_scripts/kicad_netlist_reader.py @@ -435,7 +435,7 @@ class netlist(): self._curr_element = None - # component blacklist regexs, made from excluded_* above. + # component blacklist regexs, made from exluded_* above. self.excluded_references = [] self.excluded_values = [] self.excluded_footprints = [] @@ -569,7 +569,7 @@ class netlist(): Omit those that should not, by consulting the blacklists: excluded_values, excluded_refs, and excluded_footprints, which hold one or more regular expressions. If any of the the regular expressions match - the corresponding field's value in a component, then the component is excluded. + the corresponding field's value in a component, then the component is exluded. """ # pre-compile all the regex expressions: @@ -672,10 +672,11 @@ class netlist(): for t in re.split( '(\d+)', str ) ] for g in groups: - g = sorted(g, key=lambda g: sortKey(g.getRef())) + #g = sorted(g, key=lambda g: sortKey(g.getRef())) + g.sort(key=lambda g: sortKey(g.getRef())) # Finally, sort the groups to order the references alphabetically - groups = sorted(groups, key=lambda group: sortKey(group[0].getRef())) + groups.sort(key=lambda group: sortKey(group[0].getRef())) return groups