FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 12-01-2010, 03:04 PM
Ales Kozumplik
 
Default 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.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 03:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org