diff options
author | B. Stack <bgstack15@gmail.com> | 2024-09-24 11:36:40 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2024-09-24 11:36:40 -0400 |
commit | 593c1ffff26aebecc3161592c3e3ab56cf96baa4 (patch) | |
tree | f2f15423d57b7f5fad05cd3e10e614ef28e0daa7 | |
parent | flash finger that completed an action (diff) | |
download | fprintd-tk-593c1ffff26aebecc3161592c3e3ab56cf96baa4.tar.gz fprintd-tk-593c1ffff26aebecc3161592c3e3ab56cf96baa4.tar.bz2 fprintd-tk-593c1ffff26aebecc3161592c3e3ab56cf96baa4.zip |
add unused verbose flag to lib
-rw-r--r-- | fprintd_tk_lib.py | 8 |
1 files 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": |