aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index cd34d196..2a779431 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -542,7 +542,10 @@ class Plugin(object):
_file = None
for _file in files:
- current_size += os.stat(_file)[stat.ST_SIZE]
+ try:
+ current_size += os.stat(_file)[stat.ST_SIZE]
+ except (OSError, FileNotFoundError):
+ self._log_info("failed to stat '%s'" % _file)
if sizelimit and current_size > sizelimit:
limit_reached = True
break