Skip to content

Commit 9e6fc4c

Browse files
committed
raise explicit exception if EOF found when looking for changelog sections
1 parent b910b60 commit 9e6fc4c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/update-release-branch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
188188
# until we find the first section, just duplicate all lines
189189
while True:
190190
line = f.readline()
191+
if not line:
192+
raise Exception('Could not find the first changed section in CHANGELOG') # EOF
191193

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

0 commit comments

Comments
 (0)