1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #13348 from emonty/bug/iterate-on-none

Put in trap for args being None
This commit is contained in:
James Cammarata 2015-11-28 13:44:09 -05:00
commit ea23159be4

View file

@ -157,7 +157,7 @@ class ModuleArgsParser:
# only internal variables can start with an underscore, so # only internal variables can start with an underscore, so
# we don't allow users to set them directy in arguments # 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: for arg in args:
if arg.startswith('_ansible_'): if arg.startswith('_ansible_'):
raise AnsibleError("invalid parameter specified for action '%s': '%s'" % (action, arg)) raise AnsibleError("invalid parameter specified for action '%s': '%s'" % (action, arg))