From 2cb81d8758fa94288e7147966c639c65ae3cc3d7 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Wed, 28 Jan 2026 15:54:18 -0500 Subject: [PATCH] Reuse MirrorListHandler instance (#4184) --- archinstall/lib/global_menu.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/archinstall/lib/global_menu.py b/archinstall/lib/global_menu.py index 429e77f6..aaeaf8d4 100644 --- a/archinstall/lib/global_menu.py +++ b/archinstall/lib/global_menu.py @@ -555,12 +555,10 @@ class GlobalMenu(AbstractMenu[None]): return packages def _mirror_configuration(self, preset: MirrorConfiguration | None = None) -> MirrorConfiguration | None: - if self._mirror_list_handler is not None: - mirror_list_handler = self._mirror_list_handler - else: - mirror_list_handler = MirrorListHandler() + if self._mirror_list_handler is None: + self._mirror_list_handler = MirrorListHandler() - mirror_configuration = MirrorMenu(mirror_list_handler, preset=preset).run() + mirror_configuration = MirrorMenu(self._mirror_list_handler, preset=preset).run() if mirror_configuration and mirror_configuration.optional_repositories: # reset the package list cache in case the repository selection has changed