Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction/utils.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-05-05 20:48:01 +1000
committerGitHub <noreply@github.com>2022-05-05 12:48:01 +0200
commitbcd810d2d20e657d96f36e0007facff71e9532bc (patch)
treeb3b50f73b6b159bab19d5caaa279f0e3d637568c /archinstall/lib/user_interaction/utils.py
parent2d371571783cde70554e3e4e272beab2546ffff9 (diff)
Fix 1117 (#1126)
* Fix 1117 * Update * flake8 Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/user_interaction/utils.py')
-rw-r--r--archinstall/lib/user_interaction/utils.py11
1 files changed, 4 insertions, 7 deletions
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)