From 9c5d1e98916d41c3a8cb951dcec08217cddefbed Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 18 Oct 2020 13:20:58 +0200 Subject: Added error handling to guided.py when not selecting a profile to install. --- archinstall/lib/user_interaction.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'archinstall') diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index e01859b3..0d3a12f5 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -81,11 +81,9 @@ def select_profile(options): print(' -- (Leave blank to skip this next optional step) --') selected_profile = input('Any particular pre-programmed profile you want to install: ') - #print(' -- You can enter ? or help to search for more profiles --') - #if selected_profile.lower() in ('?', 'help'): - # filter_string = input('Search for layout containing (example: "sv-"): ') - # new_options = search_keyboard_layout(filter_string) - # return select_language(new_options) + if len(selected_profile.strip()) <= 0: + return None + if selected_profile.isdigit() and (pos := int(selected_profile)) <= len(profiles)-1: selected_profile = profiles[pos] elif selected_profile in options: -- cgit v1.2.3-54-g00ecf