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-09 20:02:48 +1000
committerGitHub <noreply@github.com>2022-05-09 12:02:48 +0200
commit0fa52a5424e28ed62ef84bdc92868bbfc434e015 (patch)
tree4b88e7799319aa9489f7e16beedf5517b6feba34 /archinstall/lib/user_interaction/utils.py
parent20ffebac50478554a7582de5e5c1d8b4504ea8be (diff)
Introduce ctrl+c and other bug fixes (#1152)
* Intergrate ctrl+c * stash * Update * Fix profile reset * 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.py6
1 files changed, 3 insertions, 3 deletions
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)