This commit is contained in:
Jonathan Wren 2022-10-01 10:18:11 -07:00
parent 3624bde2c0
commit 46a7aa0d2f

View file

@ -51,11 +51,15 @@ def prompt_password(attempts: int, max_attempts: int) -> tuple[int, str]:
print_msg(Message(MsgText.WrongPasswordTryAgain, MsgStyle.WARNING)) print_msg(Message(MsgText.WrongPasswordTryAgain, MsgStyle.WARNING))
attempts += 1 attempts += 1
return attempts, print_msg( return (
Message(MsgText.Password, MsgStyle.PROMPT), attempts,
get_input=True, print_msg(
hide_input=True, Message(MsgText.Password, MsgStyle.PROMPT),
) or "" get_input=True,
hide_input=True,
)
or "",
)
def yesno(prompt: Message, default: bool = True) -> bool: def yesno(prompt: Message, default: bool = True) -> bool: