mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix error on 'help module' in ansible-console (#19390)
If 'help xattr' for example, ansible-console would traceback because module_docs.get_docstring() now returns 4 values (module metadata was added)
This commit is contained in:
@@ -356,7 +356,7 @@ class ConsoleCLI(CLI, cmd.Cmd):
|
||||
if module_name in self.modules:
|
||||
in_path = module_loader.find_plugin(module_name)
|
||||
if in_path:
|
||||
oc, a, _ = module_docs.get_docstring(in_path)
|
||||
oc, a, _, _ = module_docs.get_docstring(in_path)
|
||||
if oc:
|
||||
display.display(oc['short_description'])
|
||||
display.display('Parameters:')
|
||||
@@ -388,8 +388,8 @@ class ConsoleCLI(CLI, cmd.Cmd):
|
||||
|
||||
def module_args(self, module_name):
|
||||
in_path = module_loader.find_plugin(module_name)
|
||||
oc, a, _ = module_docs.get_docstring(in_path)
|
||||
return oc['options'].keys()
|
||||
oc, a, _, _ = module_docs.get_docstring(in_path)
|
||||
return list(oc['options'].keys())
|
||||
|
||||
def run(self):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user