From 691b726c5f557f8b97bbccd9d5ffba98e51263d6 Mon Sep 17 00:00:00 2001 From: ricolin Date: Sat, 7 Oct 2017 16:32:23 +0800 Subject: [PATCH] Remove redundant null engine id check if `lock != self.LOCK_NONE` is true here then `self._calling_engine_id is None` will alway be true. Change-Id: I9a9158c4b135f0890807f63784468c069d320c52 --- heat/engine/resource.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/heat/engine/resource.py b/heat/engine/resource.py index 61cc8f3bde..522fdea020 100644 --- a/heat/engine/resource.py +++ b/heat/engine/resource.py @@ -1993,10 +1993,8 @@ class Resource(status.ResourceStatus): if (lock == self.LOCK_NONE or self._calling_engine_id is None): resource_objects.Resource.update_by_id( self.context, self.id, rs) - if (lock != self.LOCK_NONE and - self._calling_engine_id is None): - LOG.warning('no calling_engine_id in store %s', - str(rs)) + if lock != self.LOCK_NONE: + LOG.warning("no calling_engine_id in store %s", str(rs)) else: self._store_with_lock(rs, lock) else: