Browse Source

Fix coverity check FORWARD_NULL error

Change-Id: I1e115003748b8c73144984c7132845a083b5d2a2
changes/39/674439/3
zhurong 2 years ago
parent
commit
7485c240db
  1. 2
      heat/common/exception.py
  2. 1
      heat/engine/resources/aws/ec2/instance.py
  3. 1
      heat/engine/resources/openstack/nova/server.py

2
heat/common/exception.py

@ -336,7 +336,7 @@ class ResourceFailure(HeatExceptionWithPath):
path = res_path
else:
self.exc = None
res_failed = 'Resource %s failed: ' % action.upper()
res_failed = 'Resource %s failed: ' % self.action.upper()
if res_failed in exception_or_error:
(error, message, new_path) = self._from_status_reason(
exception_or_error)

1
heat/engine/resources/aws/ec2/instance.py

@ -558,6 +558,7 @@ class Instance(resource.Resource, sh.SchedulerHintsMixin):
if server is not None:
self.resource_id_set(server.id)
assert server is not None
creator = progress.ServerCreateProgress(server.id)
attachers = []
for vol_id, device in self.volumes():

1
heat/engine/resources/openstack/nova/server.py

@ -884,6 +884,7 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin,
if server is not None:
self.resource_id_set(server.id)
assert server is not None
return server.id
def check_create_complete(self, server_id):

Loading…
Cancel
Save