aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2017-08-31 13:30:05 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-08-31 13:37:48 +0100
commitb8d0daf78a3f87e7c98d77be769fdf3c5f31ae20 (patch)
tree42fb5ac4edae7435b4b197bb6474bab656966f3a
parent138bc243aa592cd628f6e41a1b3c35f1f01f3c37 (diff)
downloadsos-b8d0daf78a3f87e7c98d77be769fdf3c5f31ae20.tar.gz
[archive] do not report IOError for virtual file systems
Ignore IO errors reported by /proc and /sys. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/archive.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sos/archive.py b/sos/archive.py
index 55886c81..607312a7 100644
--- a/sos/archive.py
+++ b/sos/archive.py
@@ -169,7 +169,11 @@ class FileCacheArchive(Archive):
try:
shutil.copy(src, dest)
except IOError as e:
- self.log_info("caught '%s' copying '%s'" % (e, src))
+ # Filter out IO errors on virtual file systems.
+ if src.startswith("/sys/") or src.startswith("/proc/"):
+ pass
+ else:
+ self.log_info("caught '%s' copying '%s'" % (e, src))
try:
shutil.copystat(src, dest)
except OSError: