diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2018-06-21 12:52:20 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-21 12:52:20 +0100 |
commit | a05905e41dd4486669858ea913f48803e1bc5614 (patch) | |
tree | 295cd5e54326adadca11621ded9c697e9483372d /po/ru.po | |
parent | 40295a36127915b344bbf0f69399a3739ab5e2cd (diff) | |
download | sos-a05905e41dd4486669858ea913f48803e1bc5614.tar.gz |
[sosreport] handle OSError in XmlReport.report()
The XmlReport class in sos.sosreport traverses the list of plugins
and prepares a report including each collected file.
The access to the file is wrapped in an except block but the recent
change to pycodestyle modified this from a 'naked' except into a
'except IOError' block.
Attempting to open a non-existent path yields an IOError, however
attempting to stat a non-existent path (or a dangling symlink
without lstat()) yields OSError:
# ln -s foo qux
# cat qux
cat: qux: No such file or directory
>>> os.stat("/foo/qux")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory: '/foo/qux'
Catch both exception classes in this method.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'po/ru.po')
0 files changed, 0 insertions, 0 deletions