> @@ -489,3 +489,8 @@ def reset_to_snapshot(self, storage, dispose=False):
> # a snapshot of early storage as we got it from scanning disks without doing any
> # changes
> on_disk_storage = StorageSnapshot()
> +
> +def filter_unsupported_disklabel_devices(devices):
This is a terrible name for a function, but I don't have a better one. Except for maybe ``get_suported_disklabel_devices()``? It's at least a bit shorter.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/650#discussion_r65089415
From: Martin Kolman <mkolman(a)redhat.com>
Otherwise some modules might get a stale Thread Manager reference
if they import it from the threads module before it is initialized.
Related: rhbz#1249598
---
initial_setup/__init__.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/initial_setup/__init__.py b/initial_setup/__init__.py
index 74928e4..eb02013 100644
--- a/initial_setup/__init__.py
+++ b/initial_setup/__init__.py
@@ -8,6 +8,15 @@
import pykickstart
import logging
import argparse
+
+# initThreading() initializes the threadMgr instance, we need to run it
+# as early as possible or else Anaconda modules might get stale
+# data
+# - they would get threadMgr == None if they did "from pyanaconda.threads import threadMgr"
+# before initThreading() was called
+from pyanaconda.threads import initThreading
+initThreading()
+
from pyanaconda.users import Users
from initial_setup.post_installclass import PostInstallClass
from initial_setup import initial_setup_log
@@ -98,12 +107,6 @@ def __init__(self, gui_mode):
from pyanaconda import anaconda_log
anaconda_log.init()
- # init threading before Gtk can do anything and before we start using threads
- # initThreading initializes the threadMgr instance, import it afterwards
- log.debug("initializing threading")
- from pyanaconda.threads import initThreading
- initThreading()
-
# initialize network logging (needed by the Network spoke that may be shown)
log.debug("initializing network logging")
from pyanaconda.network import setup_ifcfg_log
--
To view this commit on github, visit https://github.com/rhinstaller/initial-setup/commit/6f173f6e2e9dad4f18e6a3b…
Otherwise some modules might get a stale Thread Manager reference
if they import it from the threads module before it is initialized.
Related: rhbz#1249598
--
To view this pull request on github, visit https://github.com/rhinstaller/initial-setup/pull/10