From f00717ff6fd1c72d61b6928444fbf26a3f5e0e64 Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Mon, 2 May 2022 21:01:50 +1000 Subject: Fix #1106 (#1119) * Fix #1106 * flake8 * flake8 Co-authored-by: Daniel Girtler --- profiles/sway.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'profiles/sway.py') diff --git a/profiles/sway.py b/profiles/sway.py index 32d626d7..e9c71b79 100644 --- a/profiles/sway.py +++ b/profiles/sway.py @@ -18,7 +18,9 @@ __packages__ = [ def _check_driver() -> bool: - if "nvidia" in archinstall.storage.get("gfx_driver_packages", None): + packages = archinstall.storage.get("gfx_driver_packages", []) + + if packages and "nvidia" in packages: prompt = 'The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues, are you okay with that?' choice = archinstall.Menu(prompt, ['yes', 'no'], default_option='no').run() if choice == 'no': @@ -34,11 +36,15 @@ def _prep_function(*args, **kwargs): other code in this stage. So it's a safe way to ask the user for more input before any other installer steps start. """ - archinstall.storage["gfx_driver_packages"] = archinstall.select_driver(force_ask=True) - if not _check_driver(): - return _prep_function(args, kwargs) + driver = archinstall.select_driver() - return True + if driver: + archinstall.storage["gfx_driver_packages"] = driver + if not _check_driver(): + return _prep_function(args, kwargs) + return True + + return False # Ensures that this code only gets executed if executed -- cgit v1.2.3-70-g09d2