From ad120f26088a6dc985e00b6b90f034f12704fad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 3 May 2017 14:40:32 +0200 Subject: [PATCH] compose: Stop duplicating variant types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/compose.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pungi/compose.py b/pungi/compose.py index 981ae888..d49b0f3e 100644 --- a/pungi/compose.py +++ b/pungi/compose.py @@ -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))