Merge pull request #685 from coreos-inc/fixmigration

write None if we cannot find the json
This commit is contained in:
Jimmy Zelinskie 2015-10-21 16:39:07 -04:00
commit dd93710c49

View file

@ -51,7 +51,11 @@ def backfill_v1_metadata():
json_path = storage.image_json_path(uuid)
logger.debug('Updating image: %s from: %s', repo_image.id, json_path)
try:
data = storage.get_content(repo_image.storage.locations, json_path)
except IOError:
data = None
logger.exception('failed to find v1 metadata, defaulting to None')
repo_image.v1_json_metadata = data
repo_image.save()
except ImageStoragePlacement.DoesNotExist: