[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 14/16] Unlink backend logger config file when stopping logger.



---
 pyanaconda/backend_log.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/backend_log.py b/pyanaconda/backend_log.py
index fd11692..145ab03 100644
--- a/pyanaconda/backend_log.py
+++ b/pyanaconda/backend_log.py
@@ -81,8 +81,15 @@ class BackendSyslog:
             with open(SYSLOG_PIDFILE, 'r') as pidfile:
                 pid = int(pidfile.read())
             os.kill(pid, signal.SIGKILL)
-        except:
-            return
-        global_log.info("Backend logger stopped.")
+        except Exception:
+            pass
+        else:
+            global_log.info("Backend logger stopped.")
+
+        try:
+            os.unlink(SYSLOG_CFGFILE)
+        except OSError as e:
+            global_log.error("Failed to unlink backend logger config file: %s"
+                             % e)
 
 log = BackendSyslog()
-- 
1.7.3.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]