Remove all implicit calls to self.format.destroy from Device classes.
We are scheduling the actions we need. This is just noise now.
---
storage/devices.py | 19 -------------------
1 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/storage/devices.py b/storage/devices.py
index e1f08d3..415697c 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -609,10 +609,6 @@ class StorageDevice(Device):
if not self.isleaf:
raise DeviceError("Cannot destroy non-leaf device")
- if self.status:
- # best effort
- self.format.destroy()
-
self.exists = False
# we already did this in DeviceTree._removeDevice
#for parent in self.parents:
@@ -805,9 +801,6 @@ class DiskDevice(StorageDevice):
if not self.mediaPresent:
raise DeviceError("cannot destroy disk %s which has no media" % self.name)
- if self.status:
- self.format.destroy()
-
self.partedDisk.deleteAllPartitions()
# this is perhaps a separate operation (wiping the disklabel)
self.partedDisk.clobber()
@@ -1169,9 +1162,6 @@ class PartitionDevice(StorageDevice):
raise DeviceError("Cannot destroy non-leaf device")
self.setupParents()
- if self.status:
- self.format.destroy()
-
self.disk.removePartition(self)
self.disk.commit()
@@ -1955,9 +1945,6 @@ class LVMLogicalVolumeDevice(DMDevice):
if not self.exists:
raise DeviceError("device has not been created")
- if self.status:
- self.format.destroy()
-
self.teardown()
lvm.lvremove(self.vg.name, self._name)
self.exists = False
@@ -2291,9 +2278,6 @@ class MDRaidArrayDevice(StorageDevice):
if not self.exists:
raise DeviceError("device has not been created")
- if self.status:
- self.format.destroy()
-
self.teardown()
# The destruction of the formatting on the member devices does the
@@ -2572,9 +2556,6 @@ class FileDevice(StorageDevice):
if not self.exists:
raise DeviceError("device has not been created")
- if self.status:
- self.format.destroy()
-
os.unlink(self.path)
self.exists = False
--
1.6.0.6
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list