Skip to content

Commit

Permalink
raise explicit exception if EOF found when looking for changelog sect…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
nickfyson committed Dec 18, 2023
1 parent b910b60 commit 9e6fc4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 the first changed section in CHANGELOG') # EOF

if line.startswith('## '):
line = line.replace(f'## {source_branch_major_version}', f'## {target_branch_major_version}')
Expand Down

0 comments on commit 9e6fc4c

Please sign in to comment.