[master 4/5] Simplify StorageDevice.growable.

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


From: mulhern <amulhern at redhat.com>

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devices/storage.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
index f5c7c11..2f2f789 100644
--- a/blivet/devices/storage.py
+++ b/blivet/devices/storage.py
@@ -680,14 +680,8 @@ def vendor(self):
 
     @property
     def growable(self):
-        """ True if this device or it's component devices are growable. """
-        grow = getattr(self, "req_grow", False)
-        if not grow:
-            for parent in self.parents:
-                grow = parent.growable
-                if grow:
-                    break
-        return grow
+        """ True if this device or its component devices are growable. """
+        return getattr(self, "req_grow", any(p.growable for p in self.parents))
 
     def checkSize(self):
         """ Check to make sure the size of the device is allowed by the


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


More information about the anaconda-patches mailing list