imc_xml: Use the correct response in error message (#26435)

pull/26437/head
Dag Wieers 7 years ago committed by John R Barker
parent 365f3dc9d9
commit f2ce2d2199

@ -364,8 +364,8 @@ def main():
# Perform actual request
resp, info = fetch_url(module, url, data=data, method='POST', timeout=timeout)
if resp is None or auth['status'] != 200:
module.fail_json(msg='Task failed with error %(status)s: %(msg)s' % auth, **result)
if resp is None or info['status'] != 200:
module.fail_json(msg='Task failed with error %(status)s: %(msg)s' % info, **result)
# Merge results with previous results
rawoutput = resp.read()

Loading…
Cancel
Save