[master 5/5] Simplify StorageDevice.disks.

mulkieran installerbot-noreply at redhat.com
Wed Mar 4 01:53:42 UTC 2015


From: mulhern <amulhern at redhat.com>

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devices/storage.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
index 2f2f789..8a2411c 100644
--- a/blivet/devices/storage.py
+++ b/blivet/devices/storage.py
@@ -156,9 +156,7 @@ def disks(self):
         """ A list of all disks this device depends on, including itself. """
         _disks = []
         for parent in self.parents:
-            for disk in parent.disks:
-                if disk not in _disks:
-                    _disks.append(disk)
+            _disks.extend(d for d in parent.disks if d not in _disks)
 
         if self.isDisk and not self.format.hidden:
             _disks.append(self)


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/06342f7063698808c24d47df92f6ee19ac8e3c87


More information about the anaconda-patches mailing list