Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-01-26 10:57:48 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-01-26 10:57:48 +0100
commit30e66e49ecde503bf0706a363a41d4cbff174f4a (patch)
treef137adc95a685c0e05d8acf280bda9a60e9d3a8f /profiles
parent2885da3f71288c507eb1a4f8539139c65d3b70a5 (diff)
Fixes #86 by properly raising the the correct exceptions. This will happen when required steps are skipped. And the error message is to simply restart the installer.
Diffstat (limited to 'profiles')
-rw-r--r--profiles/xorg.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/profiles/xorg.py b/profiles/xorg.py
index a5820268..1282b8a5 100644
--- a/profiles/xorg.py
+++ b/profiles/xorg.py
@@ -59,8 +59,10 @@ def select_driver(options):
selected_driver = options[drivers[pos]]
elif selected_driver in options:
selected_driver = options[options.index(selected_driver)]
+ elif len(selected_driver) == 0:
+ raise archinstall.RequirementError("At least one graphics driver is needed to support a graphical environment. Please restart the installer and try again.")
else:
- RequirementError("Selected driver does not exist.")
+ raise archinstall.RequirementError("Selected driver does not exist.")
if type(selected_driver) == dict:
driver_options = sorted(list(selected_driver))
@@ -72,14 +74,16 @@ def select_driver(options):
selected_driver_package_group = selected_driver[driver_options[pos]]
elif selected_driver_package_group in selected_driver:
selected_driver_package_group = selected_driver[selected_driver.index(selected_driver_package_group)]
+ elif len(selected_driver_package_group) == 0:
+ raise archinstall.RequirementError(f"At least one driver package is required for a graphical environment using {selected_driver}. Please restart the installer and try again.")
else:
- RequirementError(f"Selected driver-type does not exist for {initial_option}.")
+ raise archinstall.RequirementError(f"Selected driver-type does not exist for {initial_option}.")
return selected_driver_package_group
return selected_driver
- raise RequirementError("Selecting drivers require a least one profile to be given as an option.")
+ raise archinstall.RequirementError("Selecting drivers require a least one profile to be given as an option.")
def _prep_function(*args, **kwargs):
"""