Commit 5bb5082e by Michael DeHaan

Fix failed to parse message handling

parent 0579b8b4
......@@ -138,7 +138,7 @@ def parse_json(raw_data):
for t in tokens:
if t.find("=") == -1:
raise errors.AnsibleError("failed to parse: %s" % data)
raise errors.AnsibleError("failed to parse: %s" % raw_data)
(key,value) = t.split("=", 1)
if key == 'changed' or 'failed':
if value.lower() in [ 'true', '1' ]:
......@@ -149,7 +149,7 @@ def parse_json(raw_data):
value = int(value)
results[key] = value
if len(results.keys()) == 0:
return { "failed" : True, "parsed" : False, "msg" : data }
return { "failed" : True, "parsed" : False, "msg" : raw_data }
return results
_LISTRE = re.compile(r"(\w+)\[(\d+)\]")
......
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