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

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



On 11/30/2010 09:09 PM, David Lehman wrote:
---
  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()

Ack.


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