Skip to content

Commit

Permalink
Verbose string match error in bump_version.py
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Mar 15, 2024
1 parent 5f52ad9 commit a840db1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion release_tools/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,10 @@ def patch_changelog(next_version: Version, dry_run: bool) -> None:
path = Path("CHANGES.rst")
content = path.read_text(encoding="utf-8")
before_unreleased = "These features will be included in the next release:\n\n"
insert_point = content.index(before_unreleased) + len(before_unreleased)
try:
insert_point = content.index(before_unreleased) + len(before_unreleased)
except ValueError as exc:
raise ValueError(f"{exc} {before_unreleased!r}") from exc
before = content[:insert_point]
after = content[insert_point:]
title = f"{next_version}_ - {date.today()}"
Expand Down

0 comments on commit a840db1

Please sign in to comment.