Skip to content

Commit

Permalink
ptgrep - when timing requested, and no password specified request one…
Browse files Browse the repository at this point in the history
… up-front

So as to not time how long the user takes to enter a password.
Only useful for same password for all notes, if password is wrong, or a
different password is needed later on user enter time will still be
measured as well.
  • Loading branch information
clach04 committed Nov 17, 2024
1 parent 6d01e85 commit 7c928b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions puren_tonbo/tools/ptgrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ def main(argv=None):
"""

password_func = password
if options.time and callable(password_func):
print('timing requested and password missing, grabbing password now so as to not time user interactions (for single/same password scenerio)')
_ = password_func()

grep(search_term, paths_to_search, options, use_color, password_func, note_encoding)

Expand Down

0 comments on commit 7c928b5

Please sign in to comment.