[PATCH] Implement DNFPayload.environmentOptionIsDefault (#1179905)

Samantha N. Bueno sbueno+anaconda at redhat.com
Thu Jan 8 15:15:33 UTC 2015


On Thu, Jan 08, 2015 at 09:43:18AM -0500, David Shea wrote:
> ---
>  pyanaconda/packaging/dnfpayload.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
> index f8bfdea..3b223d3 100644
> --- a/pyanaconda/packaging/dnfpayload.py
> +++ b/pyanaconda/packaging/dnfpayload.py
> @@ -559,7 +559,10 @@ class DNFPayload(packaging.PackagePayload):
>          env = self._base.comps.environment_by_pattern(environmentid)
>          if env is None:
>              raise packaging.NoSuchGroup(environmentid)
> -        return False
> +
> +        # Look a group in the optionlist that matches the group_id and
Look for a group?

Other than that, ack.

> +        # has default set
> +        return any(grp for grp in env.option_ids if grp.name == grpid and grp.default)
>  
>      def groupDescription(self, grpid):
>          """ Return name/description tuple for the group specified by id. """
> -- 
> 2.1.0
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches


More information about the anaconda-patches mailing list