Skip to content

Commit

Permalink
deal with model_info is none (#253)
Browse files Browse the repository at this point in the history
* make sure the model_info_dict defaults to an empty dict

* Update rosys/vision/detector_hardware.py

Co-authored-by: Falko Schindler <falko@zauberzeug.com>

---------

Co-authored-by: Niklas Neugebauer <68709968+NiklasNeugebauer@users.noreply.github.com>
Co-authored-by: Falko Schindler <falko@zauberzeug.com>
  • Loading branch information
3 people authored Jan 24, 2025
1 parent cc7c620 commit f28a7da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rosys/vision/detector_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def fetch_detector_info(self) -> DetectorInfo:
raise DetectorException('Invalid response from detector')

try:
model_info_dict = response.get('model_info', {})
model_info_dict = response.get('model_info') or {}
return DetectorInfo(
operation_mode=response['operation_mode'],
state=response.get('state'),
Expand Down

0 comments on commit f28a7da

Please sign in to comment.