From d20e67d70823a7b705a0d0fcf08f622a012d1ce9 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 28 Nov 2015 13:37:40 -0500 Subject: [PATCH] Put in trap for args being None _normalize_old_style_args can return None. If it does, the loop "for args in args" blows up. --- lib/ansible/parsing/mod_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index ba2a37cea0..abc35a415e 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -157,7 +157,7 @@ class ModuleArgsParser: # only internal variables can start with an underscore, so # we don't allow users to set them directy in arguments - if action not in ('command', 'shell', 'script', 'raw'): + if args and action not in ('command', 'shell', 'script', 'raw'): for arg in args: if arg.startswith('_ansible_'): raise AnsibleError("invalid parameter specified for action '%s': '%s'" % (action, arg))