[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 14/15] Actions' devices must be in the tree except for ActionCreateDevice.



The device associated with an action being registered with the DeviceTree
must already be in the tree unless the action will create the device.
---
 pyanaconda/storage/devicetree.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index b070521..3c75c3e 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -374,8 +374,7 @@ class DeviceTree(object):
             Modifications to the Device instance are handled before we
             get here.
         """
-        if (action.isDestroy or action.isResize or \
-            (action.isCreate and action.isFormat)) and \
+        if not (action.isCreate and action.isDevice) and \
            action.device not in self._devices:
             raise DeviceTreeError("device is not in the tree")
         elif (action.isCreate and action.isDevice):
-- 
1.7.2.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]