File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,11 @@ def __init__(
7171 self .calibration_path : str | None = None
7272
7373 def get_supported_resolutions (self ):
74- curr_format = self .controller .get_format ()
74+ try :
75+ curr_format = self .controller .get_format ()
76+ except FileNotFoundError :
77+ CameraInfo .logger .fatal (f"Camera { self .identifier } disconnected. Cannot read information." )
78+
7579 return self .valid_formats [str (curr_format [0 ])]
7680
7781 def set_color_format (self , color_format : str ) -> bool :
@@ -177,7 +181,10 @@ def get(self, control_name: str):
177181 return self .controller .get_control_value (self .controls [control_name ])
178182
179183 def get_format (self ) -> None :
180- curr_format = self .controller .get_format ()
184+ try :
185+ curr_format = self .controller .get_format ()
186+ except FileNotFoundError :
187+ CameraInfo .logger .fatal (f"Camera { self .identifier } disconnected. Cannot read information." )
181188
182189 self .valid_frame_rates = {
183190 round (1 / float (i )): i
You can’t perform that action at this time.
0 commit comments