From c4c545b287609b10f3328b8a7645c7e434bf29e1 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 28 Oct 2025 23:24:00 +0100 Subject: [PATCH] bin/ci: Fix SyntaxWarning about return in finally block Remove the finally block with a return statement in GitlabGQL.query() method. This pattern causes a SyntaxWarning in Python 3.14 as the return in finally will override any return value or exception from the try/except blocks. Move the return statement to the end of the except block where it belongs, maintaining the same error recovery behavior while fixing the warning. Signed-off-by: Christian Gmeiner Part-of: --- bin/ci/gitlab_gql.py | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/ci/gitlab_gql.py b/bin/ci/gitlab_gql.py index d632f3f408c..5eb901184d8 100755 --- a/bin/ci/gitlab_gql.py +++ b/bin/ci/gitlab_gql.py @@ -106,7 +106,6 @@ class GitlabGQL: logging.error(traceback_str) self.invalidate_query_cache() logging.error("Cache invalidated, retrying without cache") - finally: return run_uncached() def _query(