Initialize sec to None to avoid exception in security group

When an existing security group is not found in nova, heat will trigger
an exception and the stack won't be created.

Signed-off-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
Steven Dake 2012-04-17 09:06:16 -07:00
parent 7afbd05da3
commit bf68a800e5
1 changed files with 1 additions and 0 deletions

View File

@ -211,6 +211,7 @@ class SecurityGroup(Resource):
return
self.state_set(self.CREATE_IN_PROGRESS)
Resource.create(self)
sec = None
groups = self.nova().security_groups.list()
for group in groups: