[PATCH 08/11] Use a more robust method for removing previous autopart. (#868589)
David Lehman
dlehman at redhat.com
Fri Nov 9 21:09:18 UTC 2012
The old method only worked once. After that, it was trying to cancel
create actions that had already been canceled.
---
pyanaconda/ui/gui/spokes/storage.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index bf8067b..3c0059b 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -631,9 +631,11 @@ class StorageSpoke(NormalSpoke, StorageChecker):
# refreshed.
if self._previous_autopart:
self._previous_autopart = False
- actions = self.storage.devicetree.findActions(type="create")
- for action in reversed(actions):
- self.storage.devicetree.cancelAction(action)
+ for partition in self.storage.partitions[:]:
+ # check if it's been removed in a previous iteration
+ if not partition.exists and \
+ partition in self.storage.partitions:
+ self.storage.recursiveRemove(partition)
# hide/unhide disks as requested
for disk in self.disks:
--
1.7.7.6
More information about the anaconda-patches
mailing list