If there is no task_id, do not generate a task link

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-02-25 14:42:10 +01:00
parent 273e7c15d7
commit 0d859137e1

View file

@ -46,6 +46,9 @@ def _koji_link(msg):
if msg['request'] and '.stg.' in msg['request'][0]:
base = "https://koji.stg.fedoraproject.org/koji"
if not msg["task_id"]:
return ''
return base + "/taskinfo?taskID=%i" \
% (msg['task_id'])