From f45f7cd9feffcdba68c880b0a28fb7ebde94ad58 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Wed, 3 Jan 2018 17:21:29 +0100 Subject: [PATCH] fix exit code when adding a remote or guest node --- pcs/cli/common/reports.py | 2 +- pcs/cluster.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcs/cli/common/reports.py b/pcs/cli/common/reports.py index 5fd39cb..f96db73 100644 --- a/pcs/cli/common/reports.py +++ b/pcs/cli/common/reports.py @@ -130,7 +130,7 @@ def process_library_reports(report_item_list): report_item_list list of ReportItem """ if not report_item_list: - error("Errors have occurred, therefore pcs is unable to continue") + raise error("Errors have occurred, therefore pcs is unable to continue") critical_error = False for report_item in report_item_list: diff --git a/pcs/cluster.py b/pcs/cluster.py index a330164..b66bec7 100644 --- a/pcs/cluster.py +++ b/pcs/cluster.py @@ -209,7 +209,7 @@ def cluster_cmd(argv): utils.get_modificators() ) except LibraryError as e: - utils.process_library_reports(e.args) + process_library_reports(e.args) except CmdLineInputError as e: utils.exit_on_cmdline_input_errror( e, "cluster", "node " + argv[0] -- 1.8.3.1