image_uploader/base handle when an image has null labels

We missed to patch the _inspect method in BaseUploader when we did:
I67ca5956a44c3ee908e21dcf3b476e2c6c5c7f9e

This patch addresses that.

Change-Id: I7986c585160af2534365d8aff0a3e0d95cd356f4
Related-Bug: #1857012
(cherry picked from commit 6c8979720a)
This commit is contained in:
Emilien Macchi 2020-01-06 07:26:15 -05:00
parent e7e9af1f34
commit d5a26f31cf
1 changed files with 3 additions and 0 deletions

View File

@ -657,6 +657,9 @@ class BaseImageUploader(object):
created = config['created']
docker_version = config.get('docker_version', '')
labels = config['config'].get('Labels', {})
# NOTE: labels can be null
if labels is None:
labels = {}
architecture = config['architecture']
image_os = config['os']