cmd_runner module utils: fix bug when argument spec has implicit type (#6968)

* cmd_runner module utils: fix bug when argument spec has implicit type

* add changelog frag
This commit is contained in:
Alexei Znamensky 2023-07-20 08:22:54 +12:00 committed by GitHub
parent e00e82b0ca
commit f6714edabb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 1 deletions

View file

@ -208,7 +208,7 @@ class CmdRunner(object):
for mod_param_name, spec in iteritems(module.argument_spec):
if mod_param_name not in self.arg_formats:
self.arg_formats[mod_param_name] = _Format.as_default_type(spec['type'], mod_param_name)
self.arg_formats[mod_param_name] = _Format.as_default_type(spec.get('type', 'str'), mod_param_name)
def __call__(self, args_order=None, output_process=None, ignore_value_none=True, check_mode_skip=False, check_mode_return=None, **kwargs):
if output_process is None: