Blame SOURCES/bz1668422-01-fix-crashes-when-using-unsupported-options.patch

50c00a
From ff470338e6232d72f3e9f697d5c90c0f7e2a7993 Mon Sep 17 00:00:00 2001
50c00a
From: Ivan Devat <idevat@redhat.com>
50c00a
Date: Wed, 30 Jan 2019 15:13:17 +0100
50c00a
Subject: [PATCH] fix crashes when using unsupported options
50c00a
50c00a
---
50c00a
 pcs/config.py | 9 +++++----
50c00a
 pcs/status.py | 1 +
50c00a
 2 files changed, 6 insertions(+), 4 deletions(-)
50c00a
50c00a
diff --git a/pcs/config.py b/pcs/config.py
50c00a
index 304c9040..f0d80222 100644
50c00a
--- a/pcs/config.py
50c00a
+++ b/pcs/config.py
50c00a
@@ -48,11 +48,12 @@ from pcs.cli.common.errors import CmdLineInputError
50c00a
 # pylint: disable=too-many-branches, too-many-locals, too-many-statements
50c00a
 
50c00a
 def config_cmd(lib, argv, modifiers):
50c00a
-    if not argv:
50c00a
-        config_show(lib, argv, modifiers)
50c00a
-        return
50c00a
-
50c00a
     try:
50c00a
+        if not argv:
50c00a
+            sub_cmd = "show"
50c00a
+            config_show(lib, argv, modifiers)
50c00a
+            return
50c00a
+
50c00a
         sub_cmd = argv.pop(0)
50c00a
         if sub_cmd == "help":
50c00a
             usage.config(argv)
50c00a
diff --git a/pcs/status.py b/pcs/status.py
50c00a
index 5b3af0d1..3ba7d152 100644
50c00a
--- a/pcs/status.py
50c00a
+++ b/pcs/status.py
50c00a
@@ -23,6 +23,7 @@ from pcs.lib.sbd import get_sbd_service_name
50c00a
 def status_cmd(lib, argv, modifiers):
50c00a
     try:
50c00a
         if not argv:
50c00a
+            sub_cmd = "status"
50c00a
             full_status(lib, argv, modifiers)
50c00a
             sys.exit(0)
50c00a
 
50c00a
-- 
50c00a
2.17.0
50c00a