On Wed, 2014-04-23 at 17:08 -0500, David Lehman wrote:
Normally the action's apply method is called when registering the
action,
but the action that creates an extended partition that was not explicitly
requested does not get registered since the device is already be in the
tree by the time the action is instantiated.
---
blivet/devicetree.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 85c4ed0..b22cf47 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -266,7 +266,9 @@ class DeviceTree(object):
device.isExtended and not device.exists:
# don't properly register the action since the device is
# already in the tree
- self._actions.append(ActionCreateDevice(device))
+ action = ActionCreateDevice(device)
+ action.apply()
+ self._actions.append(action)
It feels more natural to me to first
add the action to the list and then
apply it. I know it doesn't matter here, but still. Otherwise this looks
good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic