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