aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2015-07-31 10:21:17 +0100
committerBryn M. Reeves <bmr@redhat.com>2015-08-03 16:43:31 +0100
commit4d8b5418b1cf218ef9746674ca5935a7f4f3983e (patch)
treecbc69ad21b70ac9d73ca1090e7b81027f06bcee2
parent24fb011755e655127b7e09f4c02275539666b4b2 (diff)
downloadsos-4d8b5418b1cf218ef9746674ca5935a7f4f3983e.tar.gz
[Plugin] fix handling of symlinks in non-sysroot environments
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index aed74965..6731b285 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -163,6 +163,8 @@ class Plugin(object):
return os.path.join(self.sysroot, path)
def strip_sysroot(self, path):
+ if not self.use_sysroot():
+ return path
if path.startswith(self.sysroot):
return path[len(self.sysroot):]
return path