From 1aadfa98c4b4073dc4ad204297739c995213afae Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 14 Apr 2021 12:46:18 +0200 Subject: Added a safety net to language selection --- examples/guided.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'examples') 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. -- cgit v1.2.3-70-g09d2