From 32ca02efd6f59a271c660027c4576ab8ea09aef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 20 Jul 2017 13:11:06 +0200 Subject: [PATCH] gather: Stop requiring comps file in nodeps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When there are no groups, we shouldn't try to read comps file (because it may very well not be there). Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/methods/method_nodeps.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pungi/phases/gather/methods/method_nodeps.py b/pungi/phases/gather/methods/method_nodeps.py index 2979cd7d..4b164be4 100644 --- a/pungi/phases/gather/methods/method_nodeps.py +++ b/pungi/phases/gather/methods/method_nodeps.py @@ -103,6 +103,10 @@ def expand_groups(compose, arch, groups): :returns: A set of tuples (pkg_name, arch) """ + if not groups: + # No groups, nothing to do (this also covers case when there is no + # comps file. + return set() comps_file = compose.paths.work.comps(arch, create_dir=False) comps = CompsWrapper(comps_file) packages = set()