From 00508c96980eded5ba9b1e0b28b72c3056c43ffd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Jan 2021 18:10:41 +0100 Subject: [PATCH] For some reason sometimes submetadata is None ... --- 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 cf108b989..7e9ae18e6 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -257,7 +257,7 @@ def log_display(path, number=None, share=False, filter_irrelevant=False, with_su except Exception: continue - if submetadata.get("parent") == base_filename: + if submetadata and submetadata.get("parent") == base_filename: yield { "name": filename[:-len(METADATA_FILE_EXT)], "description": _get_description_from_name(filename[:-len(METADATA_FILE_EXT)]),