Be more robust against empty metadata file

This commit is contained in:
Alexandre Aubin 2019-07-03 21:01:39 +02:00
parent 61f8c9efc4
commit f0ad9440cf

View file

@ -108,7 +108,7 @@ def log_list(category=[], limit=None, with_details=False):
except yaml.YAMLError:
logger.warning(m18n.n('log_corrupted_md_file', file=md_path))
entry["success"] = metadata.get("success", "?")
entry["success"] = metadata.get("success", "?") if metadata else "?"
result[category].append(entry)