From 5556c783503c0c516e0452d0b453cb3a0ab08d18 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Wed, 26 Oct 2005 21:50:18 +0000 Subject: [PATCH] - Handle "AttributeError" exception in remove() git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@206 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- utils/pidlock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/pidlock.py b/utils/pidlock.py index c5a4176a..4659dfb3 100644 --- a/utils/pidlock.py +++ b/utils/pidlock.py @@ -70,6 +70,9 @@ class PIDLock: logSys.debug("Removed PID lock " + self.path) except OSError: logSys.error("Unable to remove PID lock " + self.path) + except AttributeError: + # AttributeError if self.path wasn't specified yet + logSys.debug("PID lock not removed because not defined yet") def exists(self): """ Returns the current PID if Fail2Ban is running or False