Skip to content

Commit

Permalink
optional keyring support
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 committed Aug 27, 2023
1 parent ed28be2 commit 3413d8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion puren_tonbo/tools/ptcipher.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def usage():
default_password_value = '' # empty password, cause a bad password error
else:
default_password_value = None
password = options.password or password_file or os.environ.get('PT_PASSWORD') or default_password_value
password = options.password or password_file or os.environ.get('PT_PASSWORD') or puren_tonbo.keyring_get_password() or default_password_value
if password is None:
password = getpass.getpass("Password:")
if not isinstance(password, bytes):
Expand Down
2 changes: 1 addition & 1 deletion puren_tonbo/tools/pttkview.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def usage():
else:
default_password_value = getpass.getpass("Password:") # FIXME don't do this
"""
password = options.password or password_file or os.environ.get('PT_PASSWORD') or default_password_value
password = options.password or password_file or os.environ.get('PT_PASSWORD') or puren_tonbo.keyring_get_password() or default_password_value

if is_win:
# before GUI code, inform Windows to use the icon provided at runtime, not from the (exe) resource
Expand Down

0 comments on commit 3413d8b

Please sign in to comment.