From 8e086df084a76c93568b2f0b0f274bd67f083195 Mon Sep 17 00:00:00 2001 From: nickfyson Date: Mon, 18 Dec 2023 10:08:49 +0000 Subject: [PATCH] raise explicit exception if EOF found when looking for changelog sections --- .github/update-release-branch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/update-release-branch.py b/.github/update-release-branch.py index 7274a6305..ecde537a2 100644 --- a/.github/update-release-branch.py +++ b/.github/update-release-branch.py @@ -188,6 +188,8 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m # until we find the first section, just duplicate all lines while True: line = f.readline() + if not line: + raise Exception('Could not find any change sections in CHANGELOG.md') # EOF output += line if line.startswith('## '):