From 593c1ffff26aebecc3161592c3e3ab56cf96baa4 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 24 Sep 2024 11:36:40 -0400 Subject: add unused verbose flag to lib --- fprintd_tk_lib.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fprintd_tk_lib.py b/fprintd_tk_lib.py index 137a606..6ecbed6 100644 --- a/fprintd_tk_lib.py +++ b/fprintd_tk_lib.py @@ -4,7 +4,6 @@ # Dependencies: # /usr/bin/fprintd-* # Improve: -# add a verbose/debug param to everything? import os, subprocess, re @@ -17,7 +16,7 @@ prevent_success_messages = [ "enroll-duplicate" ] -def get_enrolled_fingers(user = None): +def get_enrolled_fingers(user = None, verbose = False): # return list of full strings of fingers that are enrolled. enrolled_fingers = [] if user is None: @@ -27,22 +26,19 @@ def get_enrolled_fingers(user = None): stdout = subprocess.PIPE, universal_newlines = True # or maybe text=True ) - #print(result.stdout) while True: line = proc.stdout.readline() if not line: break if fre.match(line): - #print(f"Got {fre.match(line).groups()[0]}") enrolled_fingers.append(fre.match(line).groups()[0].strip()) elif re.match("^.*No devices available.*", line): return [] else: - #print(f"Not-matching: {line}",end="") pass return enrolled_fingers -def fprintd_action(action, finger, status_function = None, user = None): +def fprintd_action(action, finger, status_function = None, user = None, verbose = False): if user is None: user = _user if action == "enroll": -- cgit