diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2018-10-18 11:33:12 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-18 12:23:51 +0000 |
commit | 96e83e3b0ce09ee89641d0b34b05c1eadaca599b (patch) | |
tree | 16fc604f1bd9eb526e3efd8b1377a06a2515f9d9 | |
parent | 0127e0c70b5727f9a78c1b7f9c3ca87c9fcd1d4b (diff) | |
download | sos-96e83e3b0ce09ee89641d0b34b05c1eadaca599b.tar.gz |
[logging] Always cleanup temp directory
When running `sosreport -l`, or the more specific --list-* options,
sos still creates a temp directory and log files, however we were
not cleaning those up - so over time we could have a multitude of
sos temp directories littering the filesystem.
Now always cleanup the temp directory after execution. Only
exception to this would be if we hit an OSError during execution
_and_ the debug option is specified.
Resolves: #1456
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/sosreport.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py index a57b4252..6470b93c 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -1501,5 +1501,6 @@ def main(args): """The main entry point""" sos = SoSReport(args) sos.execute() + sos._cleanup() # vim: set et ts=4 sw=4 : |