Commit aa329b4b by Jim Dalton

Make sure initial_state is initialized

parent bddaace9
...@@ -138,8 +138,7 @@ class ElbManager: ...@@ -138,8 +138,7 @@ class ElbManager:
to report it out-of-service""" to report it out-of-service"""
for lb in self.lbs: for lb in self.lbs:
if wait: initial_state = self._get_instance_health(lb) if wait else None
initial_state = self._get_instance_health(lb)
if initial_state and initial_state.state == 'InService': if initial_state and initial_state.state == 'InService':
lb.deregister_instances([self.instance_id]) lb.deregister_instances([self.instance_id])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment