gather: Stop requiring comps file in nodeps

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-07-20 13:11:06 +02:00
parent c0bac63f4d
commit 32ca02efd6
1 changed files with 4 additions and 0 deletions

View File

@ -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()