Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-133022 / 25.04 / midclt: Prompt for password if not provided in payload #19

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions truenas_api_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from base64 import b64decode
from collections import defaultdict
from collections.abc import Callable, Iterable
from getpass import getpass
import errno
import logging
import pickle
Expand Down Expand Up @@ -916,6 +917,9 @@ def main():
iparser.add_argument('-t', '--timeout', type=int)
args = parser.parse_args()

if args.username and not args.password:
args.password = getpass()

def from_json(args):
for i in args:
try:
Expand Down
Loading