Commit 2f6d6ccb by Michael DeHaan

Nicer errors from modules if arguments are not fed key=value

parent 183fce6d
......@@ -149,7 +149,10 @@ class AnsibleModule(object):
items = shlex.split(args)
params = {}
for x in items:
(k, v) = x.split("=",1)
try:
(k, v) = x.split("=",1)
except:
self.fail_json(msg="this module requires key=value arguments")
params[k] = v
return (params, args)
......
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