Correctly reference variables (#27486)
This commit is contained in:
parent
19d119f43c
commit
66adb3d993
1 changed files with 4 additions and 4 deletions
|
@ -209,15 +209,15 @@ class ACIModule(object):
|
|||
|
||||
# Handle APIC response
|
||||
if query['status'] != 200:
|
||||
result['response'] = query['msg']
|
||||
result['status'] = query['status']
|
||||
self.result['response'] = query['msg']
|
||||
self.result['status'] = query['status']
|
||||
try:
|
||||
# APIC error
|
||||
aci_response_json(self.result, query['body'])
|
||||
module.fail_json(msg='Query failed: %(error_code)s %(error_text)s' % self.result, **self.result)
|
||||
self.module.fail_json(msg='Query failed: %(error_code)s %(error_text)s' % self.result, **self.result)
|
||||
except KeyError:
|
||||
# Connection error
|
||||
module.fail_json(msg='Query failed for %(url)s. %(msg)s' % query)
|
||||
self.module.fail_json(msg='Query failed for %(url)s. %(msg)s' % query)
|
||||
|
||||
query = json.loads(resp.read())
|
||||
|
||||
|
|
Loading…
Reference in a new issue