Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-27 18:48:48 +0000
committerGitHub <noreply@github.com>2021-04-27 18:48:48 +0000
commite7a429db117313294ebeee2cc460405ba28da8b8 (patch)
treef08bf9fbc4a8c26a51a97e373247b0aca550f7b6 /archinstall/lib/user_interaction.py
parentae1253afab4a9588444ef7a9b878587380c8cbfe (diff)
parenta706a98151fcd80d414c5184c3e9325aaab475ec (diff)
Merge pull request #344 from SecondThundeR/misc-cleanup
Misc. cleanup
Diffstat (limited to 'archinstall/lib/user_interaction.py')
-rw-r--r--archinstall/lib/user_interaction.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 5cfb0a1b..cd848136 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -289,7 +289,7 @@ def generic_select(options, input_text="Select one of the above by index or abso
print(f"{index}: {option}")
# The new changes introduce a single while loop for all inputs processed by this function
- # Now the try...except...else block handles validation for invalid input from the user
+ # Now the try...except block handles validation for invalid input from the user
while True:
try:
selected_option = input(input_text)
@@ -305,6 +305,7 @@ def generic_select(options, input_text="Select one of the above by index or abso
if selected_option >= len(options):
raise RequirementError(f'Selected option "{selected_option}" is out of range')
selected_option = options[selected_option]
+ break
elif selected_option in options:
break # We gave a correct absolute value
else:
@@ -312,8 +313,6 @@ def generic_select(options, input_text="Select one of the above by index or abso
except RequirementError as err:
log(f" * {err} * ", fg='red')
continue
- else:
- break
return selected_option