Commit 0f95961e by Mohan Krishnan

Fix exception being thrown for new instance

Currently if we are trying to register an instance that has not yet
been registered with the elb an exception is thrown.
parent 79cefa1a
...@@ -202,7 +202,7 @@ class ElbManager: ...@@ -202,7 +202,7 @@ class ElbManager:
if instance_state.state == awaited_state: if instance_state.state == awaited_state:
# Check the current state agains the initial state, and only set # Check the current state agains the initial state, and only set
# changed if they are different. # changed if they are different.
if instance_state.state != initial_state.state: if (initial_state is None) or (instance_state.state != initial_state.state):
self.changed = True self.changed = True
break break
elif self._is_instance_state_pending(instance_state): elif self._is_instance_state_pending(instance_state):
......
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