diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-03-25 16:35:44 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-25 17:26:53 +0000 |
commit | d80c999ce0089e8326ee090d48308ed76dca363b (patch) | |
tree | 761de1c8bfc13bf91042050c7232e372cca7eaf2 | |
parent | 83817d2ebfac2568995b21616639246525a00f1d (diff) | |
download | sos-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__.py | 2 |
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: |