From 678704e49bb79d76179c23eac54f6a665da82ec3 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Jan 22 2022 20:01:33 +0000 Subject: Provide meaningful message when importing image files fails References: https://pagure.io/koji/issue/3221 Signed-off-by: Igor Raits --- diff --git a/hub/kojihub.py b/hub/kojihub.py index dedb8a2..235a32a 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