Merge pull request #51679 from Ch3LL/bp-51383

Backport #51383 into 2019.2
This commit is contained in:
Gareth J. Greenaway 2019-02-15 16:31:05 -08:00 committed by GitHub
commit 2036c8aaf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ def _parse_image_meta(image=None, detail=False):
if image and 'Error' in image:
ret = image
elif image:
elif image and 'manifest' in image:
name = image['manifest']['name']
version = image['manifest']['version']
os = image['manifest']['os']
@ -164,6 +164,8 @@ def docker_to_uuid(uuid):
if _is_docker_uuid(uuid):
images = list_installed(verbose=True)
for image_uuid in images:
if 'name' not in images[image_uuid]:
continue
if images[image_uuid]['name'] == uuid:
return image_uuid
return None