Avoid using variable 'cur_host' before assignment

Change-Id: Iafbd7b89340e52839d5157b05244280e3485ac08
Closes-Bug: #1806214
This commit is contained in:
Hongbin Lu 2018-12-01 21:38:54 +00:00
parent d339a18c63
commit c8d1c0873f

View File

@ -570,7 +570,7 @@ class DockerDriver(driver.ContainerDriver):
LOG.info('Host of container %s changed from %s to %s',
container.uuid, old_host, container.host)
for container in non_existent_containers:
if container.host == cur_host:
if container.host == CONF.host:
if container.auto_remove:
container.status = consts.DELETED
container.save(context)