image_uploader: handle when an image has null labels
If an image inspect returns empty Labels, set the labels to an empty
dictionary.
Change-Id: I67ca5956a44c3ee908e21dcf3b476e2c6c5c7f9e
Closes-Bug: #1857012
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
(cherry picked from commit faec3e0801
)
This commit is contained in:
parent
64f35058d4
commit
ce403472f4
|
@ -2117,6 +2117,9 @@ class PythonImageUploader(BaseImageUploader):
|
|||
digest = image['digest']
|
||||
created = image['created']
|
||||
labels = config['config'].get('Labels', {})
|
||||
# NOTE: labels can be null
|
||||
if labels is None:
|
||||
labels = {}
|
||||
architecture = config['architecture']
|
||||
image_os = config['os']
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue