ansible-test - Improve unknown env error message (#83610)

pull/83617/head
Matt Clay 4 months ago committed by GitHub
parent 506d12de69
commit 906c969b55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Improve the error message shown when an unknown ``--remote`` or ``--docker`` option is given.

@ -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):

Loading…
Cancel
Save