Skip to content

Commit 2f9bfa7

Browse files
committed
refactor: update exception messages when no camera found
1 parent 01b610f commit 2f9bfa7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/crappy/camera/gphoto2_camera.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ def open(self,
8484

8585
if self._camera is None:
8686
if model is not None and port is not None:
87-
raise IOError(
88-
f"Camera '{model}' on port '{port}' not found."
89-
)
87+
raise IOError(f"Could not find camera {model} on port {port} !")
9088
elif model is not None and port is None:
91-
raise IOError(f"Camera '{model}' not found.")
92-
elif model is None and port is None:
93-
raise IOError(f"No camera found found.")
89+
raise IOError(f"Could not find camera {model} !")
90+
elif model is None and port is not None:
91+
raise IOError(f"Could not find a camera on port {port} !")
92+
else:
93+
raise IOError(f"No compatible camera found !")
9494

9595
self.set_all(**kwargs)
9696

0 commit comments

Comments
 (0)