[PATCH] Implement DNFPayload.environmentOptionIsDefault (#1179905)

Brian C. Lane bcl at redhat.com
Thu Jan 8 16:13:11 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
> +        # 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

Ack, but could you describe what's being done in the commit message?
comment #1 from the bug would work.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list