Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Fix #2526
Browse files Browse the repository at this point in the history
Fail on unhandled exception rather than raise
  • Loading branch information
Shawn Siefkas committed Aug 2, 2016
1 parent d346c01 commit 57f5d40
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cloud/amazon/ec2_asg.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,12 @@ def elb_healthy(asg_connection, elb_connection, module, group_name):
# but has not yet show up in the ELB
try:
lb_instances = elb_connection.describe_instance_health(lb, instances=instances)
except boto.exception.InvalidInstance:
pass
except boto.exception.BotoServerError as e:
if e.error_code == 'InvalidInstance':
return None

module.fail_json(msg=str(e))

for i in lb_instances:
if i.state == "InService":
healthy_instances.append(i.instance_id)
Expand Down

0 comments on commit 57f5d40

Please sign in to comment.