mirror of https://github.com/ansible/ansible.git
ansible-doc man formatter: fail with better error message when description isn't there (#70046)
* ansible-doc man formatter: do not crash when description isn't there. * Change to report a better error message when description is not there. * Add test.pull/70483/head
parent
7d7f15fc9b
commit
9164b96774
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- "ansible-doc - improve error message in text formatter when ``description`` is missing for a (sub-)option or a return value or its ``contains`` (https://github.com/ansible/ansible/pull/70046)."
|
@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
from __future__ import absolute_import, division, print_function
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
|
DOCUMENTATION = '''
|
||||||
|
---
|
||||||
|
module: test_docs_returns
|
||||||
|
short_description: Test module
|
||||||
|
description:
|
||||||
|
- Test module
|
||||||
|
author:
|
||||||
|
- Ansible Core Team
|
||||||
|
options:
|
||||||
|
test:
|
||||||
|
type: str
|
||||||
|
'''
|
||||||
|
|
||||||
|
EXAMPLES = '''
|
||||||
|
'''
|
||||||
|
|
||||||
|
RETURN = '''
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
module = AnsibleModule(
|
||||||
|
argument_spec=dict(
|
||||||
|
test=dict(type='str'),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
module.exit_json()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
Reference in New Issue