diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2018-03-28 12:42:33 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-03-28 12:42:33 +0100 |
commit | 820a82613a6ff820bfc959bf914d488a52a679df (patch) | |
tree | 8231c6bb2533a0643c13a155849fde30a6b63e6a | |
parent | 0f88926f43cc1b113811c3471902eae203d54955 (diff) | |
download | sos-820a82613a6ff820bfc959bf914d488a52a679df.tar.gz |
[sosreport] remove exception handling from SoSReport.cleanup()
It's pointless catching exceptions only to re-raise them.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/sosreport.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py index 8bfc95fd..02d9b21c 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -1560,17 +1560,14 @@ class SoSReport(object): self.global_plugin_options[key] = value def _cleanup(self): - try: - # archive and tempfile cleanup may fail due to a fatal - # OSError exception (ENOSPC, EROFS etc.). - if self.archive: - self.archive.cleanup() - if self.tempfile_util: - self.tempfile_util.clean() - if self.tmpdir: - rmtree(self.tmpdir) - except: - raise + # archive and tempfile cleanup may fail due to a fatal + # OSError exception (ENOSPC, EROFS etc.). + if self.archive: + self.archive.cleanup() + if self.tempfile_util: + self.tempfile_util.clean() + if self.tmpdir: + rmtree(self.tmpdir) def execute(self): try: |