[PATCH f12-branch] ActionDestroyFormat setup device before modifying the partition table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 storage/deviceaction.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/storage/deviceaction.py b/storage/deviceaction.py
index 0b34555..8901e50 100644
--- a/storage/deviceaction.py
+++ b/storage/deviceaction.py
@@ -304,17 +304,18 @@ class ActionDestroyFormat(DeviceAction):
     def execute(self, intf=None):
         """ wipe the filesystem signature from the device """
         if self.origFormat:
+            # set up our copy of the original device stack since the
+            # reference we got may have had any number of things changed
+            # since then (most notably, formats removed by this very
+            # class' constructor)
+            self._device.setup()
+
             if isinstance(self._device, PartitionDevice) and \
                self.origFormat.partedFlag is not None:
                 # unset partition flags and commit
                 self._device.unsetFlag(self.origFormat.partedFlag)
                 self._device.disk.format.commitToDisk()
 
-            # set up our copy of the original device stack since the
-            # reference we got may have had any number of things changed
-            # since then (most notably, formats removed by this very
-            # class' constructor)
-            self._device.setup()
             self.origFormat.destroy()
             udev_settle()
             self._device.teardown()
-- 
1.6.5.rc2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux