diff options
Diffstat (limited to 'test/sanity/code-smell/release-names.py')
-rw-r--r-- | test/sanity/code-smell/release-names.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/sanity/code-smell/release-names.py b/test/sanity/code-smell/release-names.py index cac3071d..81d90d81 100644 --- a/test/sanity/code-smell/release-names.py +++ b/test/sanity/code-smell/release-names.py @@ -22,7 +22,7 @@ Test that the release name is present in the list of used up release names from __future__ import annotations -import pathlib +from yaml import safe_load from ansible.release import __codename__ @@ -30,7 +30,8 @@ from ansible.release import __codename__ def main(): """Entrypoint to the script""" - releases = pathlib.Path('.github/RELEASE_NAMES.txt').read_text().splitlines() + with open('.github/RELEASE_NAMES.yml') as f: + releases = safe_load(f.read()) # Why this format? The file's sole purpose is to be read by a human when they need to know # which release names have already been used. So: @@ -40,7 +41,7 @@ def main(): if __codename__ == name: break else: - print(f'.github/RELEASE_NAMES.txt: Current codename {__codename__!r} not present in the file') + print('.github/RELEASE_NAMES.yml: Current codename was not present in the file') if __name__ == '__main__': |