aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2019-03-25 16:35:44 +0100
committerBryn M. Reeves <bmr@redhat.com>2019-03-25 17:26:53 +0000
commitd80c999ce0089e8326ee090d48308ed76dca363b (patch)
tree761de1c8bfc13bf91042050c7232e372cca7eaf2
parent83817d2ebfac2568995b21616639246525a00f1d (diff)
downloadsos-d80c999ce0089e8326ee090d48308ed76dca363b.tar.gz
[plugins] do_file_sub to catch nonexisting file
If trying to do_file_sub on not-captured file, IOError is raised that we have to catch like OSError. Resolves: #1621 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 607828f9..4c8822b7 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -503,7 +503,7 @@ class Plugin(object):
self.archive.add_string(result, srcpath)
else:
replacements = 0
- except OSError as e:
+ except (OSError, IOError) as e:
# if trying to regexp a nonexisting file, dont log it as an
# error to stdout
if e.errno == errno.ENOENT: