From 84ad5ddc52b9848a17e884c0630e0fae2cd83caf Mon Sep 17 00:00:00 2001 From: moonburnt Date: Sat, 18 Sep 2021 11:45:35 +0300 Subject: [PATCH 1/2] fix: removed pointless check "if not" will already trigger on None, no need to specifically mention it --- howdy/src/cli/add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/howdy/src/cli/add.py b/howdy/src/cli/add.py index 1cab2e9..8e117f4 100644 --- a/howdy/src/cli/add.py +++ b/howdy/src/cli/add.py @@ -176,7 +176,7 @@ while frames < 60: video_capture.release() # If we've found no faces, try to determine why -if face_locations is None or not face_locations: +if not face_locations: if valid_frames == 0: print(_("Camera saw only black frames - is IR emitter working?")) elif valid_frames == dark_tries: From 494021e679ce2d2f7f6a1235cd67430c412b03a9 Mon Sep 17 00:00:00 2001 From: moonburnt Date: Sat, 18 Sep 2021 17:22:12 +0300 Subject: [PATCH 2/2] style: fixed spelling errors --- howdy/src/pam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/howdy/src/pam.py b/howdy/src/pam.py index 5e72f76..262b24c 100644 --- a/howdy/src/pam.py +++ b/howdy/src/pam.py @@ -15,7 +15,7 @@ config.read(os.path.dirname(os.path.abspath(__file__)) + "/config.ini") def doAuth(pamh): - """Starts authentication in a seperate process""" + """Starts authentication in a separate process""" # Abort if Howdy is disabled if config.getboolean("core", "disabled"): @@ -103,7 +103,7 @@ def doAuth(pamh): syslog.closelog() return pamh.PAM_SUCCESS - # Otherwise, we can't discribe what happend but it wasn't successful + # Otherwise, we can't describe what happened but it wasn't successful pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "Unknown error: " + str(status))) syslog.syslog(syslog.LOG_INFO, "Failure, unknown error" + str(status)) syslog.closelog()