diff --git a/scripts/retrigger_integrating_projects.py b/scripts/retrigger_integrating_projects.py
index 45f64efab88690b4d033a5bb707a055f77aca10e..4ca7d24cc71e8f07f780f6fa2eaa2cf036e31b74 100755
--- a/scripts/retrigger_integrating_projects.py
+++ b/scripts/retrigger_integrating_projects.py
@@ -84,17 +84,18 @@ def main():
                 retry_transient_errors=True,
             )
             try:
+                states = ["success", "running"]
                 jobs = retrigger_pipeline_jobs(
                     project,
                     pipeline,
                     args.job,
-                    ["success", "running"],
+                    states,
                     include_children=True,
                 )
                 if not jobs:
                     print(
-                        "Could not find any jobs named '%s' in %s"
-                        % (args.job, pipeline.web_url)
+                        "Could not find any jobs named '%s' with states %s in %s"
+                        % (args.job, states, pipeline.web_url)
                     )
             except GitlabJobRetryError as e:
                 print(