From 8daae75a78655a7472b448e6cc48a5922700379c Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 1 Sep 2020 14:33:55 +0200 Subject: Adding service logic. Checking if reflector has finished before we select custom mirrors (if any) --- examples/guided.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/guided.py') diff --git a/examples/guided.py b/examples/guided.py index 33716221..f906df30 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -7,8 +7,12 @@ def perform_installation(device, boot_partition, language, mirrors): formatted and setup prior to entering this function. """ with archinstall.Installer(device, boot_partition=boot_partition, hostname=hostname) as installation: + while archinstall.service_state('reflector') != 'dead': + time.sleep(0.25) + + archinstall.use_mirrors(mirrors) # Set the mirrors for the live medium if installation.minimal_installation(): - installation.set_mirrors(mirrors) + installation.set_mirrors(mirrors) # Set the mirrors in the installation medium installation.set_keyboard_language(language) installation.add_bootloader() @@ -46,7 +50,6 @@ archinstall.set_keyboard_language(keyboard_language) # Set which region to download packages from during the installation mirror_regions = archinstall.select_mirror_regions(archinstall.list_mirrors()) -archinstall.use_mirrors(mirror_regions) harddrive = archinstall.select_disk(archinstall.all_disks()) while (disk_password := getpass.getpass(prompt='Enter disk encryption password (leave blank for no encryption): ')): -- cgit v1.2.3-70-g09d2