From 99df7063e3c304555b87dbae5dfa76fb627faf99 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 10 2021 09:39:08 +0000 Subject: PR#2906: lib: return taskLabel for unknown tasks Merges #2906 https://pagure.io/koji/pull-request/2906 Fixes: #2904 https://pagure.io/koji/issue/2904 Plugins can add new method signatures but they are not reflected in web ui. --- 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')