Skip to content

Commit

Permalink
simplify while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfyson authored Apr 16, 2024
1 parent 71e6077 commit c7a8056
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
with open('CHANGELOG.md', 'r') as f:

# until we find the first section, just duplicate all lines
while True:
found_first_section = False
found_first_section = False
while not found_first_section:
line = f.readline()
if not line:
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
Expand All @@ -197,9 +197,6 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
found_first_section = True

output += line
if found_first_section:
# we now handle things differently
break

# found_content tracks whether we hit two headings in a row
found_content = False
Expand Down

0 comments on commit c7a8056

Please sign in to comment.