Merge "Don't refetch same image over and over"

This commit is contained in:
Zuul 2018-01-22 19:09:23 +00:00 committed by Gerrit Code Review
commit cba1c46b21

View File

@ -1065,6 +1065,9 @@ def configure_discovered_services(conf, services):
def _download_file(url, destination):
if os.path.exists(destination):
LOG.info("Image '%s' already fetched to '%s'.", url, destination)
return
LOG.info("Downloading '%s' and saving as '%s'", url, destination)
f = urllib2.urlopen(url)
data = f.read()