diff --git a/workers/securityworker.py b/workers/securityworker.py index 11492fbf2..a7d7a6b95 100644 --- a/workers/securityworker.py +++ b/workers/securityworker.py @@ -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)