Provide meaningful message when importing image files fails

References: https://pagure.io/koji/issue/3221
Signed-off-by: Igor Raits <igor.raits@gmail.com>
This commit is contained in:
Igor Raits 2022-01-22 20:31:13 +01:00 committed by Tomas Kopecek
parent 77ea6f9a47
commit 052afc5a14

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