Adapted to the new Digi-Key cache style and fixed return value
This commit is contained in:
parent
616cdcd6bf
commit
7a6a264c5f
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue