From df9b615d7b9c908b1db42496b1a04eceb50fa497 Mon Sep 17 00:00:00 2001 From: Balthasar Reuter Date: Wed, 1 Jul 2015 00:36:47 +0200 Subject: [PATCH] Increased waiting time on 'no focus' to avoid nasty canon bug --- camera.py | 3 ++- photobooth.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/camera.py b/camera.py index 91995d4..b81bd7f 100644 --- a/camera.py +++ b/camera.py @@ -51,7 +51,8 @@ class Camera_gPhoto: if "ERROR" in output: raise subprocess.CalledProcessError(returncode=0, cmd=cmd, output=output) except subprocess.CalledProcessError as e: - if "Canon EOS Capture failed: 2019" in e.output: + if "Canon EOS Capture failed: 2019" in e.output or + "Perhaps no focus" in e.output: raise CameraException("Can't focus!\nMove a little bit!", True) elif "No camera found" in e.output: raise CameraException("No (supported) camera detected!", False) diff --git a/photobooth.py b/photobooth.py index 5143f2d..258db70 100755 --- a/photobooth.py +++ b/photobooth.py @@ -320,7 +320,7 @@ class Photobooth: self.display.clear() self.display.show_message(e.message) self.display.apply() - sleep(3) + sleep(5) else: raise CameraException("Giving up! Please start again!", False) else: