From c092529a98296dfe74f44f0186ca1132ecc802cd Mon Sep 17 00:00:00 2001 From: boltgolt Date: Fri, 29 Mar 2019 22:51:08 +0100 Subject: [PATCH] Misc fixes for #120 and #126 --- debian/postinst | 2 +- src/compare.py | 4 ++++ src/config.ini | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 0f4e021..7ab3b89 100755 --- a/debian/postinst +++ b/debian/postinst @@ -73,7 +73,7 @@ if not os.path.exists("/tmp/howdy_picked_device"): # MIGRATION 2.5.0 -> 2.5.1 # Remove unsafe automatic dismissal of lock screen if key == "dismiss_lockscreen": - if (value == "true"): + if value == "true": print("DEPRECATION: Config falue dismiss_lockscreen is no longer supported because of login loop issues.") continue diff --git a/src/compare.py b/src/compare.py index e26e14e..98c6b72 100644 --- a/src/compare.py +++ b/src/compare.py @@ -183,6 +183,10 @@ while True: # Grab a single frame of video ret, frame = video_capture.read() + if frames == 1 and ret is False: + print("Could not read from camera") + exit(12) + try: # Convert from color to grayscale # First processing of frame, so frame errors show up here diff --git a/src/config.ini b/src/config.ini index 995516f..1183f48 100644 --- a/src/config.ini +++ b/src/config.ini @@ -75,4 +75,5 @@ exposure = -1 [debug] # Show a short but detailed diagnostic report in console +# Enabling this can cause some UI apps to fail, only enable it to debug end_report = false