[PATCH 4/5] Cancel actions before hiding descendent devices.

David Lehman dlehman at redhat.com
Tue Sep 16 21:01:52 UTC 2014


Canceling the actions can change the set of descendants.

Fedora:
Related: rhbz#1121383

RHEL:
Related: rhbz#1085201
Related: rhbz#1129595
Related: rhbz#1075671
---
 blivet/devicetree.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index ea45b2a..417e39a 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1938,15 +1938,14 @@ class DeviceTree(object):
         if device in self._hidden:
             return
 
+        # cancel actions first thing so that we hide the correct set of devices
+        for action in reversed(self._actions):
+            self.cancelAction(action)
+
         for d in self.getChildren(device):
             self.hide(d)
 
-        log.info("hiding device %s %s (id %d)", device.type,
-                                                device.name,
-                                                device.id)
-
-        for action in reversed(self._actions):
-            self.cancelAction(action)
+        log.info("hiding device %s", device)
 
         if not device.exists:
             return
-- 
1.9.3



More information about the anaconda-patches mailing list