compose: Stop duplicating variant types
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
c784dab4aa
commit
ad120f2608
@ -235,9 +235,8 @@ class Compose(kobo.log.LoggingBase):
|
||||
|
||||
def get_variants(self, types=None, arch=None):
|
||||
result = []
|
||||
types = types or ["variant", "optional", "addon", "layered-product"]
|
||||
for i in self.variants.itervalues():
|
||||
if i.type in types and (not arch or arch in i.arches):
|
||||
if (not types or i.type in types) and (not arch or arch in i.arches):
|
||||
result.append(i)
|
||||
result.extend(i.get_variants(types=types, arch=arch))
|
||||
return sorted(set(result))
|
||||
|
Loading…
Reference in New Issue
Block a user