From 2e87ced20d104dc4943eb594a06f63a38dfb5118 Mon Sep 17 00:00:00 2001 From: nicholasyang Date: Tue, 24 Sep 2024 17:25:41 +0800 Subject: [PATCH] Dev: report: make error messages easier to parse for hawk2 (bsc#1228899) --- crmsh/report/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crmsh/report/core.py b/crmsh/report/core.py index 2f3ca6661..825c3ba15 100644 --- a/crmsh/report/core.py +++ b/crmsh/report/core.py @@ -412,8 +412,9 @@ def find_ssh_user(context: Context) -> None: if not crmutils.can_ask(): logger.error('Cannot create a report non-interactively. Interactive authentication is required.') if userdir.getuser() == 'hacluster': - logger.warning('Passwordless ssh does not work. Run "crm cluster health hawk2 --fix" to set it up.') - raise ValueError('Cannot create a report.') + raise ValueError('Passwordless ssh does not work. Run "crm cluster health hawk2 --fix" to set it up.') + else: + raise ValueError('Cannot create a report.') def load_from_crmsh_config(context: Context) -> None: