diff options
author | David Lehman <dlehman@redhat.com> | 2009-03-24 18:00:25 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-03-24 19:47:07 -0500 |
commit | 82c16d2ca057417b6e02bb389b26005ea50477f4 (patch) | |
tree | 80c66276383c3bfdefc44defb5f6b291cde968c2 /storage/partitioning.py | |
parent | 52f15f952e6e7686905931c43aa4d1fcfa362c3e (diff) | |
download | anaconda-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.py | 3 |
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() |