From 61931f2c4b47f1e08479b3e46e09e8b3d7ab5f13 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 14 Oct 2019 20:28:16 +0200 Subject: [PATCH] We don't want this to call .error() for legit logs already completed --- src/yunohost/log.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 8b0f893e8..0f5ff784c 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -502,7 +502,10 @@ class OperationLogger(object): The missing of the message below could help to see an electrical shortage. """ - self.error(m18n.n('log_operation_unit_unclosed_properly')) + if self.ended_at is not None or self.started_at is None: + return + else: + self.error(m18n.n('log_operation_unit_unclosed_properly')) def _get_description_from_name(name):