Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-03 11:25:34 +0200
committerAnton Hvornum <anton@hvornum.se>2021-04-03 11:25:34 +0200
commitbb295cb83a21e104fd39e05b627403d170c2c445 (patch)
tree884a10084e5d32d2cb421234674a32ade2e404a0 /archinstall/lib
parent428bf168684c990a07dde8f71e062d76a3638efc (diff)
Fixes #149 as well as --help. This will be added in the next patch release.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/user_interaction.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 80db7be1..630862ee 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -272,9 +272,16 @@ def select_language(options, show_only_country_codes=True):
print(' -- You can enter ? or help to search for more languages --')
selected_language = input('Select one of the above keyboard languages (by number or full name): ')
if selected_language.lower() in ('?', 'help'):
- filter_string = input('Search for layout containing (example: "sv-"): ')
- new_options = search_keyboard_layout(filter_string)
- return select_language(new_options, show_only_country_codes=False)
+ while True:
+ filter_string = input('Search for layout containing (example: "sv-"): ')
+ new_options = list(search_keyboard_layout(filter_string))
+
+ if len(new_options) <= 0:
+ log(f"Search string '{filter_string}' yielded no results, please try another search or Ctrl+D to abort.", fg='yellow')
+ continue
+
+ return select_language(new_options, show_only_country_codes=False)
+
elif selected_language.isdigit() and (pos := int(selected_language)) <= len(languages)-1:
selected_language = languages[pos]
# I'm leaving "options" on purpose here.