[blivet] Re-initialize platform in storageInitialize (#962104)

Brian C. Lane bcl at redhat.com
Thu May 23 17:53:23 UTC 2013


From: "Brian C. Lane" <bcl at redhat.com>

---
 blivet/__init__.py | 4 ++++
 blivet/platform.py | 7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index 2d69eb1..7de454f 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -125,6 +125,10 @@ def storageInitialize(storage, ksdata, protected):
     from pyanaconda.flags import flags as anaconda_flags
     flags.update_from_anaconda_flags(anaconda_flags)
 
+    # Platform class setup depends on flags, re-initialize it.
+    import platform
+    platform.reset_platform()
+
     storage.shutdown()
 
     # Before we set up the storage system, we need to know which disks to
diff --git a/blivet/platform.py b/blivet/platform.py
index 3f7a00c..69005d9 100644
--- a/blivet/platform.py
+++ b/blivet/platform.py
@@ -405,5 +405,8 @@ def getPlatform():
     else:
         raise SystemError, "Could not determine system architecture."
 
-global platform
-platform = getPlatform()
+def reset_platform():
+    global platform
+    platform = getPlatform()
+
+reset_platform()
-- 
1.8.1.4



More information about the anaconda-patches mailing list