Add check for empty locations list
This commit is contained in:
parent
73b0d045d9
commit
927a0b639c
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ class SecurityWorker(Worker):
|
||||||
if not storage.exists(locations, path):
|
if not storage.exists(locations, path):
|
||||||
locations = _get_storage_locations(image['storage_uuid'])
|
locations = _get_storage_locations(image['storage_uuid'])
|
||||||
|
|
||||||
if not storage.exists(locations, path):
|
if not locations or not storage.exists(locations, path):
|
||||||
logger.warning('Could not find a valid location to download layer %s',
|
logger.warning('Could not find a valid location to download layer %s',
|
||||||
image['docker_image_id']+'.'+image['storage_uuid'])
|
image['docker_image_id']+'.'+image['storage_uuid'])
|
||||||
_update_image(image, False, self._target_version)
|
_update_image(image, False, self._target_version)
|
||||||
|
|
Reference in a new issue