PR#3223: Provide meaningful message when importing image files fails

Merges #3223
https://pagure.io/koji/pull-request/3223

Fixes #3221
https://pagure.io/koji/issue/3221
This commit is contained in:
Tomas Kopecek 2022-01-31 10:17:44 +01:00
commit 0a1554bbd5

View file

@ -10375,9 +10375,8 @@ def importImageInternal(task_id, build_info, imgdata):
for imgfile in imgdata['files']:
fullpath = joinpath(workpath, imgfile)
archivetype = get_archive_type(imgfile)
logger.debug('image type we are importing is: %s' % archivetype)
if not archivetype:
raise koji.BuildError('Unsupported image type')
raise koji.BuildError('Unsupported file type: %s' % imgfile)
archives.append(import_archive(fullpath, build_info, 'image', imgdata))
# upload logs