[PATCH 2/5] Correctly determine whether any partitioning has been done. (#842920)
Vratislav Podzimek
vpodzime at redhat.com
Fri Jun 6 06:33:49 UTC 2014
On Thu, 2014-06-05 at 12:45 -0500, David Lehman wrote:
> ---
> iw/autopart_type.py | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/iw/autopart_type.py b/iw/autopart_type.py
> index d1e64b4..c445a1a 100644
> --- a/iw/autopart_type.py
> +++ b/iw/autopart_type.py
> @@ -148,6 +148,14 @@ class PartitionTypeWindow(InstallWindow):
> def _isInteractiveKS(self):
> return self.anaconda.isKickstart and self.anaconda.id.ksdata.interactive.interactive
>
> + def _partitioningSpecified(self):
> + # see if any device create actions have been scheduled other than
> + # reformatting disks
> + create_actions = [a for a in self.storage.findActions(type="create")
> + if not (a.isFormat() and
> + a.format.type == "disklabel")]
> + return len(create_actions) > 0
This could be using generator instead of list comprehension with the
'len(create_actions)' replaced by 'any(create_actions)' in the return
statement.
--
Vratislav Podzimek
Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list