Merge pull request #475 from nafeger/devel

Better error messaging in utils
pull/603/head
Michael DeHaan 12 years ago
commit c0a5d91592

@ -182,7 +182,12 @@ def parse_json(data):
# not JSON, but try "Baby JSON" which allows many of our modules to not
# require JSON and makes writing modules in bash much simpler
results = {}
try :
tokens = shlex.split(data)
except:
print "failed to parse json: "+ data
raise;
for t in tokens:
if t.find("=") == -1:
raise errors.AnsibleError("failed to parse: %s" % data)

Loading…
Cancel
Save