aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stokes <adam.stokes@ubuntu.com>2014-08-07 14:39:26 +0200
committerBryn M. Reeves <bmr@redhat.com>2014-08-07 17:45:35 +0100
commit3c1c472aa163f9536660271787a6bdb28faf6d5a (patch)
tree9225e4b6d8ec7297e67d5181c53759787884b789
parent3112796685a7e6ca6a22a64c0fc4d3d9c87b7092 (diff)
downloadsos-3c1c472aa163f9536660271787a6bdb28faf6d5a.tar.gz
[archive] log add_string exception
Log any permission related exceptions when running plugins as non-root. Eventually this information can be reviewed to see the impact of running plugins as non-root users to better decide where root is needed on a per plugin basis. References #164 Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r--sos/archive.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/archive.py b/sos/archive.py
index c0d3d426..6d3b3494 100644
--- a/sos/archive.py
+++ b/sos/archive.py
@@ -177,8 +177,9 @@ class FileCacheArchive(Archive):
if os.path.exists(src):
try:
shutil.copystat(src, dest)
- except OSError:
- pass
+ except OSError as e:
+ self.log_error(
+ "Unable to add '%s' to FileCacheArchive: %s" % (dest, e))
self.log_debug("added string at '%s' to FileCacheArchive '%s'"
% (src, self._archive_root))