Skip to content

Commit ffd6f26

Browse files
committed
Refactor to use Tag.is_final
1 parent 3827524 commit ffd6f26

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

run_release.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,20 +1015,19 @@ def purge_the_cdn(db: ReleaseShelf) -> None:
10151015

10161016

10171017
def modify_the_prerelease_page(db: ReleaseShelf) -> None:
1018-
pre_release_tags = {"rc", "b", "a"}
1019-
if any(tag in str(db["release"]) for tag in pre_release_tags):
1018+
if db["release"].is_final:
10201019
if not ask_question(
1021-
"Have you already added the release to https://www.python.org/download/pre-releases/ ?"
1020+
"Have you already removed the release from https://www.python.org/download/pre-releases/ ?"
10221021
):
10231022
raise ReleaseException(
1024-
"The release has not been added to the pre-release page"
1023+
"The release has not been removed from the pre-release page"
10251024
)
10261025
else:
10271026
if not ask_question(
1028-
"Have you already removed the release from https://www.python.org/download/pre-releases/ ?"
1027+
"Have you already added the release to https://www.python.org/download/pre-releases/ ?"
10291028
):
10301029
raise ReleaseException(
1031-
"The release has not been removed from the pre-release page"
1030+
"The release has not been added to the pre-release page"
10321031
)
10331032

10341033

0 commit comments

Comments
 (0)