From 22c333b536d4f2a4ffb71a75b9c4fa502f5738c0 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 27 Aug 2004 06:29:11 +0000 Subject: [PATCH] Handle the case where our pidfile is deleted early. --- scripts/supybot | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/supybot b/scripts/supybot index 6b908bb3f..ae2791a7f 100755 --- a/scripts/supybot +++ b/scripts/supybot @@ -320,7 +320,10 @@ if __name__ == '__main__': fd.write('%s\n' % pid) fd.close() def removePidFile(): - os.remove(pidFile) + try: + os.remove(pidFile) + except EnvironmentError, e: + log.error('Could not remove pid file: %s', e) atexit.register(removePidFile) except EnvironmentError, e: log.error('Error opening pid file %s: %s', pidFile, e)