From 4d65639724e1402ef584221bbbb0e80dba827ab7 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Thu, 22 Apr 2021 10:31:32 +0200 Subject: Fixes the crash on empty profile choice. Since generic_select() returns None, we can't pipe that into Profile() (at least not yet) --- archinstall/lib/user_interaction.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 1cfe5490..e0761e07 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -351,9 +351,10 @@ def select_profile(options): selected_profile = generic_select(profiles, 'Enter a pre-programmed profile name if you want to install one: ', options_output=False) - return Profile(None, selected_profile) - - raise RequirementError("Selecting profiles require a least one profile to be given as an option.") + if selected_profile: + return Profile(None, selected_profile) + else: + raise RequirementError("Selecting profiles require a least one profile to be given as an option.") def select_language(options, show_only_country_codes=True): """ -- cgit v1.2.3-70-g09d2