summaryrefslogtreecommitdiffstats
path: root/storage/devices.py
diff options
context:
space:
mode:
Diffstat (limited to 'storage/devices.py')
-rw-r--r--storage/devices.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/storage/devices.py b/storage/devices.py
index 35e9be62a..6494601a5 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()
@@ -1184,9 +1177,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()
@@ -1970,9 +1960,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
@@ -2306,9 +2293,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
@@ -2587,9 +2571,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