From b8d0daf78a3f87e7c98d77be769fdf3c5f31ae20 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Thu, 31 Aug 2017 13:30:05 +0100 Subject: [archive] do not report IOError for virtual file systems Ignore IO errors reported by /proc and /sys. Signed-off-by: Bryn M. Reeves --- sos/archive.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- cgit