Add check for empty locations list

This commit is contained in:
Joseph Schorr 2015-11-13 12:23:02 -05:00
parent 73b0d045d9
commit 927a0b639c

View file

@ -140,7 +140,7 @@ class SecurityWorker(Worker):
if not storage.exists(locations, path):
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',
image['docker_image_id']+'.'+image['storage_uuid'])
_update_image(image, False, self._target_version)