simplify while loop
This commit is contained in:
parent
71e6077db0
commit
c7a8056fc3
1 changed files with 2 additions and 5 deletions
7
.github/update-release-branch.py
vendored
7
.github/update-release-branch.py
vendored
|
|
@ -186,8 +186,8 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
|
||||||
with open('CHANGELOG.md', 'r') as f:
|
with open('CHANGELOG.md', 'r') as f:
|
||||||
|
|
||||||
# until we find the first section, just duplicate all lines
|
# 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()
|
line = f.readline()
|
||||||
if not line:
|
if not line:
|
||||||
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
|
raise Exception('Could not find any change sections in CHANGELOG.md') # EOF
|
||||||
|
|
@ -197,9 +197,6 @@ def process_changelog_for_backports(source_branch_major_version, target_branch_m
|
||||||
found_first_section = True
|
found_first_section = True
|
||||||
|
|
||||||
output += line
|
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 tracks whether we hit two headings in a row
|
||||||
found_content = False
|
found_content = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue