mirror of https://github.com/fail2ban/fail2ban
wrapped with exception handling to avoid crash during pidlock remove
parent
d922899bba
commit
ee0ce118a9
|
@ -70,6 +70,9 @@ class PIDLock:
|
||||||
logSys.debug("Removed PID lock " + self.path)
|
logSys.debug("Removed PID lock " + self.path)
|
||||||
except OSError:
|
except OSError:
|
||||||
logSys.error("Unable to remove PID lock " + self.path)
|
logSys.error("Unable to remove PID lock " + self.path)
|
||||||
|
# AttributeError if self.path wasn't specified yet
|
||||||
|
except AttributeError:
|
||||||
|
logSys.debug("PID lock not removed because not defined yet")
|
||||||
|
|
||||||
def exists(self):
|
def exists(self):
|
||||||
""" Returns the current PID if Fail2Ban is running or False
|
""" Returns the current PID if Fail2Ban is running or False
|
||||||
|
|
Loading…
Reference in New Issue