Fix trackback on providing arguemnt --all to ansible-doc command (#52034)
* Remove redundant argument from the function caller * Add unit test * Add changelog
This commit is contained in:
parent
e7cf6b7513
commit
2d4096daf0
3 changed files with 15 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- ansible-doc - Fix traceback on providing arguemnt --all to ansible-doc command
|
|
@ -117,7 +117,7 @@ class DocCLI(CLI):
|
||||||
|
|
||||||
# process all plugins of type
|
# process all plugins of type
|
||||||
if self.options.all_plugins:
|
if self.options.all_plugins:
|
||||||
self.args = self.get_all_plugins_of_type(plugin_type, loader)
|
self.args = self.get_all_plugins_of_type(plugin_type)
|
||||||
|
|
||||||
# dump plugin metadata as JSON
|
# dump plugin metadata as JSON
|
||||||
if self.options.json_dump:
|
if self.options.json_dump:
|
||||||
|
|
12
test/units/cli/test_doc.py
Normal file
12
test/units/cli/test_doc.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Copyright: (c) 2019, Ansible Project
|
||||||
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.cli.doc import DocCLI
|
||||||
|
|
||||||
|
|
||||||
|
def test_parsing_all_option():
|
||||||
|
doc_cli = DocCLI(['/n/ansible-doc', '-a'])
|
||||||
|
doc_cli.parse()
|
Loading…
Reference in a new issue