Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction/system_conf.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-05-05 20:48:01 +1000
committerGitHub <noreply@github.com>2022-05-05 12:48:01 +0200
commitbcd810d2d20e657d96f36e0007facff71e9532bc (patch)
treeb3b50f73b6b159bab19d5caaa279f0e3d637568c /archinstall/lib/user_interaction/system_conf.py
parent2d371571783cde70554e3e4e272beab2546ffff9 (diff)
Fix 1117 (#1126)
* Fix 1117 * Update * flake8 Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/user_interaction/system_conf.py')
-rw-r--r--archinstall/lib/user_interaction/system_conf.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/archinstall/lib/user_interaction/system_conf.py b/archinstall/lib/user_interaction/system_conf.py
index 5d4c80dc..17c093c1 100644
--- a/archinstall/lib/user_interaction/system_conf.py
+++ b/archinstall/lib/user_interaction/system_conf.py
@@ -102,9 +102,9 @@ def select_driver(options: Dict[str, Any] = AVAILABLE_GFX_DRIVERS) -> str:
def ask_for_bootloader(advanced_options: bool = False, preset: str = None) -> str:
if preset == 'systemd-bootctl':
- preset_val = 'systemd-boot' if advanced_options else 'no'
+ preset_val = 'systemd-boot' if advanced_options else Menu.no()
elif preset == 'grub-install':
- preset_val = 'grub' if advanced_options else 'yes'
+ preset_val = 'grub' if advanced_options else Menu.yes()
else:
preset_val = preset
@@ -112,11 +112,11 @@ def ask_for_bootloader(advanced_options: bool = False, preset: str = None) -> st
if has_uefi():
if not advanced_options:
bootloader_choice = Menu(_('Would you like to use GRUB as a bootloader instead of systemd-boot?'),
- ['yes', 'no'],
+ Menu.yes_no(),
preset_values=preset_val,
- default_option='no').run()
+ default_option=Menu.no()).run()
- if bootloader_choice == "yes":
+ if bootloader_choice == Menu.yes():
bootloader = "grub-install"
else:
# We use the common names for the bootloader as the selection, and map it back to the expected values.
@@ -135,9 +135,9 @@ def ask_for_bootloader(advanced_options: bool = False, preset: str = None) -> st
def ask_for_swap(preset: bool = True) -> bool:
if preset:
- preset_val = 'yes'
+ preset_val = Menu.yes()
else:
- preset_val = 'no'
+ preset_val = Menu.no()
prompt = _('Would you like to use swap on zram?')
- choice = Menu(prompt, ['yes', 'no'], default_option='yes', preset_values=preset_val).run()
- return False if choice == 'no' else True
+ choice = Menu(prompt, Menu.yes_no(), default_option=Menu.yes(), preset_values=preset_val).run()
+ return False if choice == Menu.no() else True