From b895cc760471fe206341ed5a22ffd02f80663a88 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 25 Oct 2021 12:00:57 -0300 Subject: [PATCH] Internal BoM: Fixed message about wrong distributor - The name was `None` instead of the real name --- kibot/bom/xlsx_writer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kibot/bom/xlsx_writer.py b/kibot/bom/xlsx_writer.py index 6d277729..9b78657e 100644 --- a/kibot/bom/xlsx_writer.py +++ b/kibot/bom/xlsx_writer.py @@ -413,7 +413,9 @@ def remove_unknown_distributors(distributors, available, silent): d = d.lower() if d not in available: # Is the label of the column? - d = get_dist_name_from_label(d) + new_d = get_dist_name_from_label(d) + if new_d is not None: + d = new_d if d not in available: if not silent: logger.warning(W_UNKDIST+'Unknown distributor `{}`'.format(d)) @@ -502,7 +504,7 @@ def _create_kicost_sheet(workbook, groups, image_data, fmt_title, fmt_info, fmt_ # Test Digi-Key API os.environ['DIGIKEY_CACHE_TTL'] = '-1' os.environ['DIGIKEY_STORAGE_PATH'] = op.abspath(op.join(op.dirname(__file__), '../../submodules/KiCost/tests/digikey')) - logger.setLevel(1) # Max. KiCost debug + # logger.setLevel(1) # Max. KiCost debug # ***** End of DEBUG!!! # Create the projects information structure prj_info = [{'title': p.name, 'company': p.sch.company, 'date': p.sch.date, 'qty': p.number} for p in cfg.aggregate]