comps-wrapper: Return IDs instead of yum.comps.Group

We never need anything more than the ID, so passing around a big
complicated object is not necessary.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-04-12 10:43:24 +02:00
parent c5fcab2aa5
commit 20005adb98
2 changed files with 3 additions and 2 deletions

View File

@ -46,5 +46,5 @@ class GatherSourceComps(pungi.phases.gather.source.GatherSourceBase):
comps.filter_groups(variant.groups) comps.filter_groups(variant.groups)
for i in comps.get_comps_groups(): for i in comps.get_comps_groups():
groups.add(i.groupid) groups.add(i)
return set(), groups return set(), groups

View File

@ -45,7 +45,8 @@ class CompsWrapper(object):
self.comps_file = comps_file self.comps_file = comps_file
def get_comps_groups(self): def get_comps_groups(self):
return self.comps.get_groups() """Return a list of group IDs."""
return [group.groupid for group in self.comps.get_groups()]
def write_comps(self, comps_obj=None, target_file=None): def write_comps(self, comps_obj=None, target_file=None):
if not comps_obj: if not comps_obj: