write None if we cannot find the json
This commit is contained in:
parent
627ad25c9c
commit
67497bb99c
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
data = storage.get_content(repo_image.storage.locations, 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:
|
||||
|
|
Reference in a new issue