Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py6
-rw-r--r--examples/swiss.py10
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 15226668..1cee499d 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -3,7 +3,7 @@ import os
import time
import archinstall
-from archinstall import ConfigurationOutput
+from archinstall import ConfigurationOutput, Menu
from archinstall.lib.models.network_configuration import NetworkConfigurationHandler
if archinstall.arguments.get('help'):
@@ -258,8 +258,8 @@ def perform_installation(mountpoint):
installation.log("For post-installation tips, see https://wiki.archlinux.org/index.php/Installation_guide#Post-installation", fg="yellow")
if not archinstall.arguments.get('silent'):
prompt = 'Would you like to chroot into the newly created installation and perform post-installation configuration?'
- choice = archinstall.Menu(prompt, ['yes', 'no'], default_option='yes').run()
- if choice == 'yes':
+ choice = Menu(prompt, Menu.yes_no(), default_option=Menu.yes()).run()
+ if choice == Menu.yes():
try:
installation.drop_to_shell()
except:
diff --git a/examples/swiss.py b/examples/swiss.py
index baf7b618..6d357191 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -20,7 +20,7 @@ import pathlib
from typing import TYPE_CHECKING, Any
import archinstall
-from archinstall import ConfigurationOutput, NetworkConfigurationHandler
+from archinstall import ConfigurationOutput, NetworkConfigurationHandler, Menu
if TYPE_CHECKING:
_: Any
@@ -38,8 +38,8 @@ TODO exec con return parameter
"""
def select_activate_NTP():
prompt = "Would you like to use automatic time synchronization (NTP) with the default time servers? [Y/n]: "
- choice = archinstall.Menu(prompt, ['yes', 'no'], default_option='yes').run()
- if choice == 'yes':
+ choice = Menu(prompt, Menu.yes_no(), default_option=Menu.yes()).run()
+ if choice == Menu.yes():
return True
else:
return False
@@ -480,8 +480,8 @@ def perform_installation(mountpoint, mode):
installation.log("For post-installation tips, see https://wiki.archlinux.org/index.php/Installation_guide#Post-installation", fg="yellow")
if not archinstall.arguments.get('silent'):
prompt = 'Would you like to chroot into the newly created installation and perform post-installation configuration?'
- choice = archinstall.Menu(prompt, ['yes', 'no'], default_option='yes').run()
- if choice == 'yes':
+ choice = Menu(prompt, Menu.yes_no(), default_option=Menu.yes()).run()
+ if choice == Menu.yes():
try:
installation.drop_to_shell()
except: