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
This commit is contained in:
parent
ef39e057a9
commit
d53c3f88fa
1 changed files with 8 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue