Skip to content

Commit

Permalink
Simplify StorageDevice.growable.
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Mar 3, 2015
1 parent f1231f9 commit 06b5c38
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions blivet/devices/storage.py
Expand Up @@ -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
Expand Down

0 comments on commit 06b5c38

Please sign in to comment.