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
This commit is contained in:
ricolin 2017-10-07 16:32:23 +08:00
parent 6c50ea6acd
commit 691b726c5f
1 changed files with 2 additions and 4 deletions

View File

@ -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: