Correctly reference variables (#27486)

pull/27502/head
John R Barker 7 years ago committed by GitHub
parent 19d119f43c
commit 66adb3d993

@ -209,15 +209,15 @@ class ACIModule(object):
# Handle APIC response # Handle APIC response
if query['status'] != 200: if query['status'] != 200:
result['response'] = query['msg'] self.result['response'] = query['msg']
result['status'] = query['status'] self.result['status'] = query['status']
try: try:
# APIC error # APIC error
aci_response_json(self.result, query['body']) 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: except KeyError:
# Connection error # 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()) query = json.loads(resp.read())

Loading…
Cancel
Save