From f0ad9440cf3ce1406c6e17ffe53859c9952f8010 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 3 Jul 2019 21:01:39 +0200 Subject: [PATCH] Be more robust against empty metadata file --- src/yunohost/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index decb546f4..17a6ff87c 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -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)