Re: [PATCH] Check that partition is on the disk before trying to remove it. (#491997)

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

 



Ack

On 03/24/2009 01:10 PM, David Lehman wrote:
---
  storage/partitioning.py |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index 95d6ec2..f716657 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -606,6 +606,9 @@ def allocatePartitions(disks, partitions):
              #_part.disk.partedDisk.removePartition(_part.partedPartition)
              partedDisk = partedDisks[_part.disk.partedDisk.device.path]
              #log.debug("removing part %s (%s) from disk %s (%s)" % (_part.partedPartition.path, [p.path for p in _part.partedPartition.disk.partitions], partedDisk.device.path, [p.path for p in partedDisk.partitions]))
+            if not partedDisk.getPartitionByPath(_part.path):
+                continue
+
              partedDisk.removePartition(_part.partedPartition)
              # remove empty extended so it doesn't interfere
              extended = partedDisk.getExtendedPartition()


--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
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