From 53e6e8c93600a77d8d7c537969e4e15d61cacb91 Mon Sep 17 00:00:00 2001 From: Constantin07 Date: Fri, 8 Jan 2016 11:55:40 +0000 Subject: [PATCH] Print explicit error cause when no ELBs are found in AWS --- cloud/amazon/ec2_elb_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/amazon/ec2_elb_facts.py b/cloud/amazon/ec2_elb_facts.py index 4289ef7a232..172efe7326e 100644 --- a/cloud/amazon/ec2_elb_facts.py +++ b/cloud/amazon/ec2_elb_facts.py @@ -157,7 +157,7 @@ def list_elb(connection, module): try: all_elbs = connection.get_all_load_balancers(elb_names) except BotoServerError as e: - module.fail_json(msg=get_error_message(e.args[2])) + module.fail_json(msg = "%s: %s" % (e.error_code, e.error_message)) elb_array = [] for elb in all_elbs: