Blame SOURCES/sos-bz1110918-fix-kpatch-force-enabled.patch

e75bc7
From 6b43c42078604b0551923c2801108848e97ba3b9 Mon Sep 17 00:00:00 2001
e75bc7
From: "Bryn M. Reeves" <bmr@redhat.com>
e75bc7
Date: Tue, 14 Oct 2014 15:43:20 +0100
e75bc7
Subject: [PATCH] [kpatch] do not try to read kpatch data if it could not be
e75bc7
 run
e75bc7
e75bc7
Everything the kpatch plugin does requires the list of available
e75bc7
kpatch patches obtained from 'kpatch list'. If this fails return
e75bc7
immediately from the setup method.
e75bc7
e75bc7
Fixes #417.
e75bc7
e75bc7
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
e75bc7
---
e75bc7
 sos/plugins/kpatch.py | 2 ++
e75bc7
 1 file changed, 2 insertions(+)
e75bc7
e75bc7
diff --git a/sos/plugins/kpatch.py b/sos/plugins/kpatch.py
e75bc7
index 7909926..6ef557e 100644
e75bc7
--- a/sos/plugins/kpatch.py
e75bc7
+++ b/sos/plugins/kpatch.py
e75bc7
@@ -27,6 +27,8 @@ class Kpatch(Plugin, RedHatPlugin):
e75bc7
 
e75bc7
     def setup(self):
e75bc7
         kpatch_list = self.get_cmd_output_now("kpatch list")
e75bc7
+        if not kpatch_list:
e75bc7
+            return
e75bc7
         kpatches = open(kpatch_list, "r").read().splitlines()
e75bc7
         for patch in kpatches:
e75bc7
             if not re.match("^kpatch-.*\(.*\)", patch):
e75bc7
-- 
e75bc7
1.9.3
e75bc7