Commit f02ea15f by Seth Vidal

command: make sure that all _handle_aliases() calls returns {}

module_common: also work if there are no aliases (shell, command, etc) modules
parent b54887b0
...@@ -592,10 +592,8 @@ class AnsibleModule(object): ...@@ -592,10 +592,8 @@ class AnsibleModule(object):
passwd_keys = ['password', 'login_password'] passwd_keys = ['password', 'login_password']
for param in self.params: for param in self.params:
no_log = False
if self.aliases:
canon = self.aliases.get(param, param) canon = self.aliases.get(param, param)
arg_opts = self.argument_spec[canon] arg_opts = self.argument_spec.get(canon, {})
no_log = arg_opts.get('no_log', False) no_log = arg_opts.get('no_log', False)
if no_log: if no_log:
......
...@@ -129,7 +129,7 @@ def main(): ...@@ -129,7 +129,7 @@ def main():
class CommandModule(AnsibleModule): class CommandModule(AnsibleModule):
def _handle_aliases(self): def _handle_aliases(self):
pass return {}
def _check_invalid_arguments(self): def _check_invalid_arguments(self):
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment