Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2021-04-14 12:46:18 +0200
committerGitHub <noreply@github.com>2021-04-14 12:46:18 +0200
commit1aadfa98c4b4073dc4ad204297739c995213afae (patch)
tree2e8529c6aac17849a5b1cffb71b6f1c39ffa739a /examples
parent48c679d5013e1c5a69ebcb05519aa1c73781158d (diff)
Added a safety net to language selection
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 8a16f561..c0d22023 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -14,7 +14,12 @@ def ask_user_questions():
will we continue with the actual installation steps.
"""
if not archinstall.arguments.get('keyboard-language', None):
- archinstall.arguments['keyboard-language'] = archinstall.select_language(archinstall.list_keyboard_languages()).strip()
+ while True:
+ try:
+ archinstall.arguments['keyboard-language'] = archinstall.select_language(archinstall.list_keyboard_languages()).strip()
+ break
+ except archinstall.RequirementError as err:
+ archinstall.log(err, fg="red")
# Before continuing, set the preferred keyboard layout/language in the current terminal.
# This will just help the user with the next following questions.