Convert to use any for finding stopped containers

Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
This commit is contained in:
Drew Romanyk 2017-11-30 22:00:10 -06:00 committed by Joffrey F
parent 5db3cd60d4
commit c63ad67e9c
1 changed files with 2 additions and 2 deletions

View File

@ -520,8 +520,8 @@ class Project(object):
log.debug('%s has upstream changes (%s)',
service.name,
", ".join(updated_dependencies))
containers_stopped = len(
service.containers(stopped=True, filters={'status': ['created', 'exited']})) > 0
containers_stopped = any(
service.containers(stopped=True, filters={'status': ['created', 'exited']}))
has_links = any(c.get('HostConfig.Links') for c in service.containers())
if always_recreate_deps or containers_stopped or not has_links:
plan = service.convergence_plan(ConvergenceStrategy.always)