[master 4/5] Simplify StorageDevice.growable.

mulkieran installerbot-noreply at redhat.com
Tue Mar 3 21:21:04 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..41df65f 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", False) or 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/06b5c387339537bb29ea99e3b99cbe4616d3a36f


More information about the anaconda-patches mailing list