]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Initialize sec to None to avoid exception in security group
authorSteven Dake <sdake@redhat.com>
Tue, 17 Apr 2012 16:06:16 +0000 (09:06 -0700)
committerSteven Dake <sdake@redhat.com>
Tue, 17 Apr 2012 16:07:32 +0000 (09:07 -0700)
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>
heat/engine/resources.py

index 2b1475b8db2979b273e7859f2955c3400eb59f47..42a521a160d681e2c01e7e4f7712e6d59024835f 100644 (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: