Fix the kolla_docker issue with docker 1.12
After docker 1.12, the RepoTags will be None rather than [] in the
image list API. This PS will handle the both case.
Change-Id: Ie2da44b44229c2f190550755b50876f607f9cc0c
Closes-Bug: #1608358
(cherry picked from commit ae34973d35
)
This commit is contained in:
parent
b90184e224
commit
7ead6ba4a3
|
@ -228,7 +228,10 @@ class DockerWorker(object):
|
|||
def check_image(self):
|
||||
find_image = ':'.join(self.parse_image())
|
||||
for image in self.dc.images():
|
||||
for image_name in image['RepoTags']:
|
||||
repo_tags = image.get('RepoTags')
|
||||
if not repo_tags:
|
||||
continue
|
||||
for image_name in repo_tags:
|
||||
if image_name == find_image:
|
||||
return image
|
||||
|
||||
|
|
Loading…
Reference in New Issue