From 3c1c472aa163f9536660271787a6bdb28faf6d5a Mon Sep 17 00:00:00 2001 From: Adam Stokes Date: Thu, 7 Aug 2014 14:39:26 +0200 Subject: [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 --- sos/archive.py | 5 +++-- 1 file 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)) -- cgit