From 927a0b639c5b6125b6a672493a506fe250980433 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 13 Nov 2015 12:23:02 -0500 Subject: [PATCH] Add check for empty locations list --- workers/securityworker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)