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