From 052afc5a141fb67025fb5086f19315c32c950eec Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sat, 22 Jan 2022 20:31:13 +0100 Subject: [PATCH] Provide meaningful message when importing image files fails References: https://pagure.io/koji/issue/3221 Signed-off-by: Igor Raits --- hub/kojihub.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hub/kojihub.py b/hub/kojihub.py index dedb8a2b..235a32a4 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -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