We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get_image_digest
1 parent f993c45 commit 8b0d020Copy full SHA for 8b0d020
main.py
@@ -153,6 +153,8 @@ def get_image_digest(image: Image) -> Optional[str]:
153
:param image: the image object to get the digest out of
154
:return: the repository digest for the given image or None if it's not present
155
"""
156
+ if not isinstance(image, Image):
157
+ return None
158
digests = image.attrs.get('RepoDigests')
159
if digests:
160
tag, digest = split_image(digests[0])
0 commit comments