From 7a6a264c5fda636a57e43b086b6dc9604bdf1e48 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 20 Oct 2021 11:54:33 -0300 Subject: [PATCH] Adapted to the new Digi-Key cache style and fixed return value --- kibot/bom/xlsx_writer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kibot/bom/xlsx_writer.py b/kibot/bom/xlsx_writer.py index bcdf5aed..0aa73dce 100644 --- a/kibot/bom/xlsx_writer.py +++ b/kibot/bom/xlsx_writer.py @@ -494,8 +494,7 @@ def _create_kicost_sheet(workbook, groups, image_data, fmt_title, fmt_info, fmt_ set_api_status(api, True) # ***** DEBUG!!! # Test Digi-Key API - os.environ['DIGIKEY_SAVE_RESULTS'] = '1' - os.environ['DIGIKEY_FAKE_RESULTS'] = '1' + 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 # ***** End of DEBUG!!! @@ -613,7 +612,7 @@ def _create_kicost_sheet(workbook, groups, image_data, fmt_title, fmt_info, fmt_ def create_kicost_sheet(workbook, groups, image_data, fmt_title, fmt_info, fmt_subtitle, fmt_head, fmt_cols, cfg): try: - _create_kicost_sheet(workbook, groups, image_data, fmt_title, fmt_info, fmt_subtitle, fmt_head, fmt_cols, cfg) + return _create_kicost_sheet(workbook, groups, image_data, fmt_title, fmt_info, fmt_subtitle, fmt_head, fmt_cols, cfg) except KiCostError as e: trace_dump() logger.error('KiCost error: `{}` ({})'.format(e.msg, e.id))