diff options
author | Matt Clay <matt@mystile.com> | 2024-07-15 18:37:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 18:37:40 +0200 |
commit | 906c969b551b346ef54a2c0b41e04f632b7b73c2 (patch) | |
tree | 9046bb4a20e0d7e8d819c0bd84e0c54c7b2a75a6 /test | |
parent | Update any.yml (#83588) (diff) | |
download | ansible-906c969b551b346ef54a2c0b41e04f632b7b73c2.tar.xz ansible-906c969b551b346ef54a2c0b41e04f632b7b73c2.zip |
ansible-test - Improve unknown env error message (#83610)
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/ansible_test/_internal/cli/compat.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/lib/ansible_test/_internal/cli/compat.py b/test/lib/ansible_test/_internal/cli/compat.py index 19996faf31..27267f48ac 100644 --- a/test/lib/ansible_test/_internal/cli/compat.py +++ b/test/lib/ansible_test/_internal/cli/compat.py @@ -93,7 +93,10 @@ class PythonVersionUnspecifiedError(ApplicationError): """A Python version was not specified for a context which is unknown, thus the Python version is unknown.""" def __init__(self, context: str) -> None: - super().__init__(f'A Python version was not specified for environment `{context}`. Use the `--python` option to specify a Python version.') + super().__init__( + f'Environment `{context}` is unknown. Use a predefined environment instead. ' + f'Alternatively, to use an unknown environment, use the `--python` option to specify a Python version.' + ) class ControllerNotSupportedError(ApplicationError): |