Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-29 08:21:42 +0000
committerGitHub <noreply@github.com>2021-03-29 08:21:42 +0000
commit4c5be619181b34093e42306c00526fb56e0a328f (patch)
tree4f8b6cb1c46572badf0880b3eff0a3ef33ef770b
parent70480d4681d40ab9a296f5dba1e40f200862d4e9 (diff)
parent36dfa2e1c42add691243850b62b705b26a0a796c (diff)
Merge pull request #123 from Torxed/torxed-v2.2.3
Reverting .strip() logic and moving the check into the get_password()…
-rw-r--r--archinstall/lib/user_interaction.py4
-rw-r--r--examples/guided.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index a782197e..defc2cfc 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -24,6 +24,10 @@ def get_password(prompt="Enter a password: "):
if passwd != passwd_verification:
log(' * Passwords did not match * ', bg='black', fg='red')
continue
+
+ if len(passwd.strip()) <= 0:
+ break
+
return passwd
return None
diff --git a/examples/guided.py b/examples/guided.py
index 009f9fa6..92331450 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -139,7 +139,7 @@ def ask_user_questions():
# Get disk encryption password (or skip if blank)
if not archinstall.arguments.get('!encryption-password', None):
- if (passwd := archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): ')).strip():
+ if (passwd := archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): ')):
archinstall.arguments['!encryption-password'] = passwd
archinstall.arguments['harddrive'].encryption_password = archinstall.arguments['!encryption-password']