From bcd810d2d20e657d96f36e0007facff71e9532bc Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Thu, 5 May 2022 20:48:01 +1000 Subject: Fix 1117 (#1126) * Fix 1117 * Update * flake8 Co-authored-by: Daniel Girtler --- archinstall/lib/user_interaction/utils.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 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 48b55e8c..59f2dfbc 100644 --- a/archinstall/lib/user_interaction/utils.py +++ b/archinstall/lib/user_interaction/utils.py @@ -28,12 +28,9 @@ def check_password_strong(passwd: str) -> bool: symbol_count += 40 if symbol_count**len(passwd) < 10e20: - - prompt = _("The password you are using seems to be weak,") - prompt += _("are you sure you want to use it?") - - choice = Menu(prompt, ["yes", "no"], default_option="yes").run() - return choice == "yes" + 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 True @@ -84,7 +81,7 @@ def do_countdown() -> bool: if SIG_TRIGGER: prompt = _('Do you really want to abort?') - choice = Menu(prompt, ['yes', 'no'], skip=False).run() + choice = Menu(prompt, Menu.yes_no(), skip=False).run() if choice == 'yes': exit(0) -- cgit v1.2.3-54-g00ecf