fail runroot task on non-existing tag

Fixes: https://pagure.io/koji/issue/1139
This commit is contained in:
Tomas Kopecek 2019-02-18 15:43:38 +01:00 committed by Mike McLean
parent 30a1b6564a
commit 167eba3394
2 changed files with 7 additions and 5 deletions

View file

@ -37,9 +37,9 @@ def runroot(tagInfo, arch, command, channel=None, **opts):
taskopts['channel'] = channel or 'runroot'
tag = kojihub.get_tag(tagInfo, strict=True)
if arch == 'noarch':
#not all arches can generate a proper buildroot for all tags
tag = kojihub.get_tag(tagInfo)
if not tag['arches']:
raise koji.GenericError('no arches defined for tag %s' % tag['name'])