From f2ce2d21999ba77349179012c910a8fae72ded15 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Wed, 5 Jul 2017 17:12:21 +0200 Subject: [PATCH] imc_xml: Use the correct response in error message (#26435) --- lib/ansible/modules/remote_management/imc/imc_xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/remote_management/imc/imc_xml.py b/lib/ansible/modules/remote_management/imc/imc_xml.py index 7ba8133faf7..a6b7581bd71 100644 --- a/lib/ansible/modules/remote_management/imc/imc_xml.py +++ b/lib/ansible/modules/remote_management/imc/imc_xml.py @@ -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()