[PATCH 05/11] Streamline some logic in storageInitialize.

David Lehman dlehman at redhat.com
Mon Feb 4 23:32:31 UTC 2013


---
 blivet/__init__.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index 9b5bd54..3081319 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -163,12 +163,11 @@ def storageInitialize(storage, ksdata, protected):
     # Set up the protected partitions list now.
     if protected:
         storage.config.protectedDevSpecs.extend(protected)
-        storage.reset()
 
-        if not flags.live_install and not storage.protectedDevices:
-            raise UnknownSourceDeviceError(protected)
-    else:
-        storage.reset()
+    storage.reset()
+
+    if protected and not flags.live_install and not storage.protectedDevices:
+        raise UnknownSourceDeviceError(protected)
 
     # kickstart uses all the disks
     if flags.automated_install:
-- 
1.8.1



More information about the anaconda-patches mailing list