Otherwise their self.kids counter contains and invalid value.
Related: rhbz#1085201 Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- blivet/devicetree.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py index c4cb1b7..021ad45 100644 --- a/blivet/devicetree.py +++ b/blivet/devicetree.py @@ -520,8 +520,10 @@ class DeviceTree(object): # remove the device from the tree self._removeDevice(action.device) elif action.isDestroy and action.isDevice: - # add the device back into the tree + # add the device back into the tree and inform parents about it self._addDevice(action.device) + for parent in action.device.parents: + parent.addChild()
action.cancel() self._actions.remove(action)