From 96e83e3b0ce09ee89641d0b34b05c1eadaca599b Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Thu, 18 Oct 2018 11:33:12 -0400 Subject: [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 Signed-off-by: Bryn M. Reeves --- sos/sosreport.py | 1 + 1 file changed, 1 insertion(+) 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 : -- cgit