diff options
author | David Lehman <dlehman@redhat.com> | 2012-10-10 11:17:20 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2012-10-12 09:24:54 -0500 |
commit | 99ea40844d8a02d2c5ebff26003fdf41a9d58428 (patch) | |
tree | 171fa18b5f32ce3a83880fc7d249a2c1d1ad2ca0 | |
parent | 2e98f70486b118059d8be8d428b91135bf7c83e9 (diff) | |
download | anaconda-99ea40844d8a02d2c5ebff26003fdf41a9d58428.tar.gz anaconda-99ea40844d8a02d2c5ebff26003fdf41a9d58428.tar.xz anaconda-99ea40844d8a02d2c5ebff26003fdf41a9d58428.zip |
Use Storage convenience methods to schedule reclaim actions.
This also uses Storage.recursiveRemove to remove dependent devices
before trying to remove the partition.
-rw-r--r-- | pyanaconda/ui/gui/spokes/lib/resize.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py index 2bcb6d2d0..2bfac70bb 100644 --- a/pyanaconda/ui/gui/spokes/lib/resize.py +++ b/pyanaconda/ui/gui/spokes/lib/resize.py @@ -24,7 +24,6 @@ from __future__ import division from gi.repository import Gtk from pyanaconda.ui.gui import GUIObject -from pyanaconda.storage.deviceaction import * from pyanaconda.storage.size import Size import gettext @@ -239,14 +238,11 @@ class ResizeDialog(GUIObject): return False elif action == SHRINK: if device.resizable: - self.storage.devicetree.registerAction(ActionResizeFormat(device, device.minSize)) - self.storage.devicetree.registerAction(ActionResizeDevice(device, device.minSize)) + self.storage.resizeDevice(device, device.minSize) else: - self.storage.devicetree.registerAction(ActionDestroyFormat(device)) - self.storage.devicetree.registerAction(ActionDestroyDevice(device)) + self.storage.recursiveRemove(device) elif action == DELETE: - self.storage.devicetree.registerAction(ActionDestroyFormat(device)) - self.storage.devicetree.registerAction(ActionDestroyDevice(device)) + self.storage.recursiveRemove(device) return False |