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

(cherry picked from commit 58450f041a)
pull/75258/head
Felix Fontein 3 years ago committed by GitHub
parent 676ed22a99
commit e2c60cee80
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)."

@ -599,6 +599,10 @@ class DocCLI(CLI):
if conf: if conf:
text.append(DocCLI._dump_yaml({'set_via': conf}, opt_indent)) 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): for k in sorted(opt):
if k.startswith('_'): if k.startswith('_'):
continue continue

Loading…
Cancel
Save