From 3e1df9b6ac9a53ff27f6f46a460a6c72fd4036d3 Mon Sep 17 00:00:00 2001 From: fpeters <> Date: Fri, 6 Feb 2004 11:02:01 +0000 Subject: [PATCH] =?UTF-8?q?ne=20se=20vautre=20pas=20au=20d=C3=A9marrage=20?= =?UTF-8?q?si=20un=20fichier=20de=20log=20n'existe=20pas=20en=20cas=20d'er?= =?UTF-8?q?reur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- glasnost-ctl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glasnost-ctl.py b/glasnost-ctl.py index f6e6c234..ceae326c 100755 --- a/glasnost-ctl.py +++ b/glasnost-ctl.py @@ -98,7 +98,10 @@ def doStart(): if not logDir: continue fileName = os.path.join(logDir, '%s.log' % server) - fileInstance = open(fileName,'r') + try: + fileInstance = open(fileName,'r') + except IOError: + continue print ''.join(fileInstance.readlines()[-10:]) fileInstance.close() print ' done.'