Skip to content

Commit

Permalink
Fix #430 fatal error on cam use without cam connected
Browse files Browse the repository at this point in the history
  • Loading branch information
w4ffl35 committed Jan 26, 2024
1 parent 68fbe7e commit 417f4b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/airunner/workers/vision_capture_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def start(self):
def enable_cam(self):
self.cap = cv2.VideoCapture(0)
if not self.cap.isOpened():
raise IOError("Unable to open webcam")
self.logger.error("Unable to open camera")
self.state = WorkerState.HALTED

def disable_cam(self):
if self.cap:
Expand Down

0 comments on commit 417f4b3

Please sign in to comment.