Blob Blame History Raw
From 6aefb575156919be36650c3231abf185dacf6aa8 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 26 Jan 2015 00:07:12 +0000
Subject: [PATCH 69/93] [libvirt] use join_sysroot() before calling
 os.path.exists

The libvirt plugin tests for the presence of files. Use
join_sysroot() to ensure the correct path is tested.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/libvirt.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sos/plugins/libvirt.py b/sos/plugins/libvirt.py
index 9ff8a56..ee3d4c6 100644
--- a/sos/plugins/libvirt.py
+++ b/sos/plugins/libvirt.py
@@ -55,7 +55,7 @@ class Libvirt(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
         else:
             self.add_copy_spec("/var/log/libvirt")
 
-        if os.path.exists(libvirt_keytab):
+        if os.path.exists(self.join_sysroot(libvirt_keytab)):
             self.add_cmd_output("klist -ket %s" % libvirt_keytab)
 
     def postproc(self):
-- 
1.9.3