Merge "Show the file name when there is an error loading an image metadef file"

This commit is contained in:
Jenkins 2015-10-16 22:28:36 +00:00 committed by Gerrit Code Review
commit 809d88c75c
1 changed files with 4 additions and 1 deletions

View File

@ -212,7 +212,10 @@ def _populate_metadata(meta, metadata_path=None, merge=False,
with open(file) as json_file:
metadata = json.load(json_file)
except Exception as e:
LOG.error(encodeutils.exception_to_unicode(e))
LOG.error(_LE("Failed to parse json file %(file_path)s while "
"populating metadata due to: %(error_msg)s"),
{"file_path": file,
"error_msg": encodeutils.exception_to_unicode(e)})
continue
values = {