mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Don't miserably fail if we can't load detail for a log entry
This commit is contained in:
parent
376cce4f53
commit
d507d447dd
1 changed files with 6 additions and 1 deletions
|
@ -103,7 +103,12 @@ def log_list(category=[], limit=None, with_details=False):
|
|||
entry["started_at"] = log_datetime
|
||||
|
||||
if with_details:
|
||||
try:
|
||||
metadata = read_yaml(md_path)
|
||||
except Exception as e:
|
||||
# If we can't read the yaml for some reason, report an error and ignore this entry...
|
||||
logger.error(m18n.n('log_corrupted_md_file', md_file=md_path, error=e))
|
||||
continue
|
||||
entry["success"] = metadata.get("success", "?") if metadata else "?"
|
||||
|
||||
result[category].append(entry)
|
||||
|
|
Loading…
Add table
Reference in a new issue