From cad0b9ba1fa55ec323b02a8be627bc202d76b8c1 Mon Sep 17 00:00:00 2001 From: ljf Date: Mon, 4 Jun 2018 20:58:24 +0200 Subject: [PATCH] [enh] Improve help to get log message --- locales/en.json | 2 +- src/yunohost/log.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/locales/en.json b/locales/en.json index 606e224d2..495c95f82 100644 --- a/locales/en.json +++ b/locales/en.json @@ -207,7 +207,7 @@ "iptables_unavailable": "You cannot play with iptables here. You are either in a container or your kernel does not support it", "log_corrupted_md_file": "The yaml metadata file associated with logs is corrupted : '{md_file}'", "log_category_404": "The log category '{category}' does not exist", - "log_link_to_log": "Complete log of this operation: '{desc}'", + "log_link_to_log": "Complete log of this operation: '{desc}'", "log_help_to_get_log": "To view complete log of the operation '{desc}', run: 'yunohost log display {name}'", "log_link_to_failed_log": "The operation '{desc}' has failed ! To get help please give the complete log", "log_help_to_get_failed_log": "The operation '{desc}' has failed ! To get help please give the complete log of the operation, you can get it by running: 'yunohost log display {name}'", diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 9cfa0a7e6..9ced6cc22 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -372,7 +372,9 @@ class UnitOperation(object): logger.info(m18n.n('log_help_to_get_log', name=self.name, desc=desc)) else: if is_api: - logger.warning(m18n.n('log_link_to_failed_log', name=self.name, desc=desc)) + logger.warning("" + m18n.n('log_link_to_failed_log', + name=self.name, desc=desc) + + "") else: logger.warning(m18n.n('log_help_to_get_failed_log', name=self.name, desc=desc))