--- 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. """
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 setreturn 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@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
On 01/08/2015 10:15 AM, Samantha N. Bueno wrote:
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 andLook for a group?
Yeah. The method is called while iterating over the optionlist in a comps environment, and needs to return true if the given grpid is in the optionlist and has default=true in the groupid attributes. I guess it could be argued that the method should raise NoSuchGroup if grpid isn't in the optionlist.
# has default setreturn 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@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
On Thu, Jan 08, 2015 at 10:20:01AM -0500, David Shea wrote:
On 01/08/2015 10:15 AM, Samantha N. Bueno wrote:
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 andLook for a group?
Yeah. The method is called while iterating over the optionlist in a comps environment, and needs to return true if the given grpid is in the optionlist and has default=true in the groupid attributes. I guess it could be argued that the method should raise NoSuchGroup if grpid isn't in the optionlist.
Heh, sorry, I just meant my comment as a correction to your wording. :P
# has default set def groupDescription(self, grpid): """ Return name/description tuple for the group specified by id. """return any(grp for grp in env.option_ids if grp.name == grpid and grp.default)-- 2.1.0
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
On 01/08/2015 10:21 AM, Samantha N. Bueno wrote:
On Thu, Jan 08, 2015 at 10:20:01AM -0500, David Shea wrote:
On 01/08/2015 10:15 AM, Samantha N. Bueno wrote:
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 andLook for a group?
Yeah. The method is called while iterating over the optionlist in a comps environment, and needs to return true if the given grpid is in the optionlist and has default=true in the groupid attributes. I guess it could be argued that the method should raise NoSuchGroup if grpid isn't in the optionlist.
Heh, sorry, I just meant my comment as a correction to your wording. :P
Ha, whoops.
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 setreturn 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.
anaconda-patches@lists.fedorahosted.org