Skip to content

Commit

Permalink
midclt: Prompt for password if not provided in payload
Browse files Browse the repository at this point in the history
  • Loading branch information
anodos325 committed Dec 11, 2024
1 parent fcacaa2 commit f9922c8
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit f9922c8

Please sign in to comment.