Do not show empty version_added_collection values in ansible-doc text output. (#74999) (#75003)

(cherry picked from commit 58450f041a)
pull/75239/head
Felix Fontein 5 years ago committed by GitHub
parent 35383360d2
commit 36eef4b9f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- "ansible-doc - in text output, do not show empty ``version_added_collection`` values (https://github.com/ansible/ansible/pull/74999)."

@ -1033,6 +1033,10 @@ class DocCLI(CLI, RoleMixin):
if conf:
text.append(DocCLI._dump_yaml({'set_via': conf}, opt_indent))
# Remove empty version_added_collection
if opt.get('version_added_collection') == '':
opt.pop('version_added_collection')
for k in sorted(opt):
if k.startswith('_'):
continue

Loading…
Cancel
Save