From 0fa52a5424e28ed62ef84bdc92868bbfc434e015 Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Mon, 9 May 2022 20:02:48 +1000 Subject: Introduce ctrl+c and other bug fixes (#1152) * Intergrate ctrl+c * stash * Update * Fix profile reset * flake8 Co-authored-by: Daniel Girtler --- archinstall/lib/user_interaction/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'archinstall/lib/user_interaction/utils.py') diff --git a/archinstall/lib/user_interaction/utils.py b/archinstall/lib/user_interaction/utils.py index 59f2dfbc..ce48607d 100644 --- a/archinstall/lib/user_interaction/utils.py +++ b/archinstall/lib/user_interaction/utils.py @@ -30,7 +30,7 @@ def check_password_strong(passwd: str) -> bool: if symbol_count**len(passwd) < 10e20: prompt = str(_("The password you are using seems to be weak, are you sure you want to use it?")) choice = Menu(prompt, Menu.yes_no(), default_option=Menu.yes()).run() - return choice == Menu.yes() + return choice.value == Menu.yes() return True @@ -40,7 +40,6 @@ def get_password(prompt: str = '') -> Optional[str]: prompt = _("Enter a password: ") while passwd := getpass.getpass(prompt): - if len(passwd.strip()) <= 0: break @@ -82,11 +81,12 @@ def do_countdown() -> bool: if SIG_TRIGGER: prompt = _('Do you really want to abort?') choice = Menu(prompt, Menu.yes_no(), skip=False).run() - if choice == 'yes': + if choice.value == Menu.yes(): exit(0) if SIG_TRIGGER is False: sys.stdin.read() + SIG_TRIGGER = False signal.signal(signal.SIGINT, sig_handler) -- cgit v1.2.3-54-g00ecf