Skip to content

Commit

Permalink
Update Mouser API to 0.1.6, fix braking change
Browse files Browse the repository at this point in the history
  • Loading branch information
eeintech committed Oct 16, 2024
1 parent eee67ff commit 9b01f0e
Show file tree
Hide file tree
Showing 2 changed files with 318 additions and 282 deletions.
5 changes: 3 additions & 2 deletions kintree/search/mouser_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ def search_timeout():
from ..common.tools import cprint
cprint(f'[INFO] Warning: {error_message}', silent=False)
finally:
return request.get_clean_response()
# Mouser 0.1.6 API update: single part list is returned, instead of dict
return request.get_clean_response()[0]

# Query part number
try:
part = search_timeout()
part: dict = search_timeout()
except:
part = None

Expand Down
Loading

0 comments on commit 9b01f0e

Please sign in to comment.