From d53c3f88fa5de083e4a8006fb66c84ad3a44d7c1 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 09 2021 12:44:04 +0000 Subject: lib: return taskLabel for unknown tasks "malformed task" has been returned for everything unknown, but external plugins can create completely valid tasks which we can't parse without those plugins. In such case we want to return at least method/arch info. Related: https://pagure.io/koji/issue/2904 --- diff --git a/koji/__init__.py b/koji/__init__.py index df2487e..360ab11 100644 --- a/koji/__init__.py +++ b/koji/__init__.py @@ -3363,7 +3363,14 @@ def _taskLabel(taskInfo): method = taskInfo['method'] request = taskInfo['request'] arch = taskInfo['arch'] - params = parse_task_params(method, request) + try: + params = parse_task_params(method, request) + except TypeError: + # for external hub plugins which are not known + # at this place (e.g. client without knowledge of such signatures) + # it should still display at least "method (arch)" + params = None + extra = '' if method in ('build', 'maven'): src = params.get('src') or params.get('url')