Blame SOURCES/bz1433948-2-validate-all-action.patch

217e50
From 57782246a43fac8640086c737597b7747120bb6d Mon Sep 17 00:00:00 2001
217e50
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
217e50
Date: Tue, 21 Mar 2017 13:29:42 +0100
217e50
Subject: [PATCH] validate-all: check _validate_input() return code
217e50
217e50
---
217e50
 fence/agents/lib/fencing.py.py | 3 ++-
217e50
 1 file changed, 2 insertions(+), 1 deletion(-)
217e50
217e50
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
217e50
index 6d32101..546640e 100644
217e50
--- a/fence/agents/lib/fencing.py.py
217e50
+++ b/fence/agents/lib/fencing.py.py
217e50
@@ -680,7 +680,8 @@ def check_input(device_opt, opt, other_conditions = False):
217e50
 
217e50
 
217e50
 	if options["--action"] == "validate-all" and not other_conditions:
217e50
-		_validate_input(options, False)
217e50
+		if not _validate_input(options, False):
217e50
+			fail_usage("validate-all failed")
217e50
 		sys.exit(EC_OK)
217e50
 	else:
217e50
 		_validate_input(options, True)