[PATCH 2/2] Inform parents when their child is added back to the devicetree

Vratislav Podzimek vpodzime at redhat.com
Thu Sep 11 14:09:57 UTC 2014


Otherwise their self.kids counter contains and invalid value.

Related: rhbz#1085201
Signed-off-by: Vratislav Podzimek <vpodzime at 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)
-- 
1.9.3



More information about the anaconda-patches mailing list