From 8681a8479a4e485f93a7dfb83c49f95ceec97bec Mon Sep 17 00:00:00 2001 From: Vendula Poncova Date: Aug 03 2020 10:57:07 +0000 Subject: Initialize the closest mirror from the main thread Disable the option for the closest mirror from the main thread in GUI. Related: rhbz#1851207 --- diff --git a/pyanaconda/ui/gui/spokes/installation_source.py b/pyanaconda/ui/gui/spokes/installation_source.py index 9677405..283e033 100644 --- a/pyanaconda/ui/gui/spokes/installation_source.py +++ b/pyanaconda/ui/gui/spokes/installation_source.py @@ -763,6 +763,7 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler): self.initialize_start() self._grab_objects() + self._initialize_closest_mirror() # I shouldn't have to do this outside GtkBuilder, but it really doesn't # want to let me pass in user data. @@ -838,9 +839,7 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler): self._ready = True hubQ.send_ready(self.__class__.__name__, False) - def _initialize(self): - threadMgr.wait(constants.THREAD_PAYLOAD) - + def _initialize_closest_mirror(self): # If there's no fallback mirror to use, we should just disable that option # in the UI. if not self.payload.mirrors_available: @@ -852,6 +851,9 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler): if itr: model.remove(itr) + def _initialize(self): + threadMgr.wait(constants.THREAD_PAYLOAD) + # If there is no Subscriptiopn DBus module, disable the CDN radio button if is_module_available(SUBSCRIPTION): gtk_call_once(self._cdn_button.set_no_show_all, True)