Blame SOURCES/sos-bz1148551-ovirt_hosted_engine-fix-exception-when-force-enabled.patch

e75bc7
From f9aefde0d7f74867031a00b52f72d0ad1ff9463b Mon Sep 17 00:00:00 2001
e75bc7
From: "Bryn M. Reeves" <bmr@redhat.com>
e75bc7
Date: Wed, 15 Oct 2014 15:51:13 +0100
e75bc7
Subject: [PATCH] [ovirt_hosted_engine] fix exception when force-enabled
e75bc7
e75bc7
Fixes #416.
e75bc7
e75bc7
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
e75bc7
---
e75bc7
 sos/plugins/ovirt_hosted_engine.py | 5 +++--
e75bc7
 1 file changed, 3 insertions(+), 2 deletions(-)
e75bc7
e75bc7
diff --git a/sos/plugins/ovirt_hosted_engine.py b/sos/plugins/ovirt_hosted_engine.py
e75bc7
index aee8bc0..02cb2b6 100644
e75bc7
--- a/sos/plugins/ovirt_hosted_engine.py
e75bc7
+++ b/sos/plugins/ovirt_hosted_engine.py
e75bc7
@@ -56,8 +56,9 @@ class OvirtHostedEngine(Plugin, RedHatPlugin):
e75bc7
 
e75bc7
         all_setup_logs = glob.glob(self.SETUP_LOG_GLOB)
e75bc7
         all_setup_logs.sort(reverse=True)
e75bc7
-        # Add latest ovirt-hosted-engine-setup log file
e75bc7
-        self.add_copy_spec(all_setup_logs[0])
e75bc7
+        if len(all_setup_logs):
e75bc7
+            # Add latest ovirt-hosted-engine-setup log file
e75bc7
+            self.add_copy_spec(all_setup_logs[0])
e75bc7
         # Add older ovirt-hosted-engine-setup log files only if requested
e75bc7
         if self.get_option('all_logs'):
e75bc7
             self.add_copy_spec_limit(
e75bc7
-- 
e75bc7
1.9.3
e75bc7