summaryrefslogtreecommitdiffstats
path: root/storage/partitioning.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-03-24 18:00:25 -0500
committerDavid Lehman <dlehman@redhat.com>2009-03-24 19:47:07 -0500
commit82c16d2ca057417b6e02bb389b26005ea50477f4 (patch)
tree80c66276383c3bfdefc44defb5f6b291cde968c2 /storage/partitioning.py
parent52f15f952e6e7686905931c43aa4d1fcfa362c3e (diff)
downloadanaconda-82c16d2ca057417b6e02bb389b26005ea50477f4.tar.gz
anaconda-82c16d2ca057417b6e02bb389b26005ea50477f4.tar.xz
anaconda-82c16d2ca057417b6e02bb389b26005ea50477f4.zip
Check that partition is on the disk before trying to remove it. (#491997)
Diffstat (limited to 'storage/partitioning.py')
-rw-r--r--storage/partitioning.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py
index 95d6ec28d..f71665734 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()