From ec78be84949be32f657fc7cd2a6dd741c0dda983 Mon Sep 17 00:00:00 2001 From: Mohan Krishnan Date: Sun, 5 Jan 2014 17:23:43 +0700 Subject: [PATCH] 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. --- cloud/ec2_elb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/ec2_elb b/cloud/ec2_elb index 6a8a25986ec..1927d6c3a7a 100644 --- a/cloud/ec2_elb +++ b/cloud/ec2_elb @@ -202,7 +202,7 @@ class ElbManager: if instance_state.state == awaited_state: # Check the current state agains the initial state, and only set # 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 break elif self._is_instance_state_pending(instance_state):