From 2b851ac66a1f5fdcb623d3ab5bbd8a34cb809f85 Mon Sep 17 00:00:00 2001 From: Tim Jaacks <tim.jaacks@garz-fricke.com> Date: Wed, 31 Aug 2022 07:52:29 +0200 Subject: [PATCH] Fix potential error message in retrigger job TypeError: 'NoneType' object is not subscriptable Example: https://git.seco.com/seco-ne/yocto/infrastructure/ci-test/minimal-manifest/-/jobs/127610 --- scripts/retrigger_pipeline_jobs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/retrigger_pipeline_jobs.py b/scripts/retrigger_pipeline_jobs.py index c55fa86e..bb90964d 100755 --- a/scripts/retrigger_pipeline_jobs.py +++ b/scripts/retrigger_pipeline_jobs.py @@ -20,7 +20,10 @@ def retrigger_pipeline_jobs( # Recurse to child pipelines if include_children: for bridge in pipeline.bridges.list(): - if bridge.downstream_pipeline["project_id"] == project.id: + if ( + bridge is not None + and bridge.downstream_pipeline["project_id"] == project.id + ): child_pipeline = project.pipelines.get( bridge.downstream_pipeline["id"], retry_transient_errors=True, -- GitLab