From f28a7da9b0d9be031814525342e18785c5ab80ac Mon Sep 17 00:00:00 2001 From: "Dr. Dennis Wittich" Date: Fri, 24 Jan 2025 12:54:46 +0100 Subject: [PATCH] deal with model_info is none (#253) * make sure the model_info_dict defaults to an empty dict * Update rosys/vision/detector_hardware.py Co-authored-by: Falko Schindler --------- Co-authored-by: Niklas Neugebauer <68709968+NiklasNeugebauer@users.noreply.github.com> Co-authored-by: Falko Schindler --- rosys/vision/detector_hardware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosys/vision/detector_hardware.py b/rosys/vision/detector_hardware.py index c1b49689..4c11a360 100644 --- a/rosys/vision/detector_hardware.py +++ b/rosys/vision/detector_hardware.py @@ -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'),