mirror of https://github.com/fail2ban/fail2ban
TST: no cover additions to server, primarily daemon creation
parent
ffe48741e3
commit
28e9acf86a
|
@ -66,7 +66,7 @@ class Server:
|
|||
|
||||
# First set the mask to only allow access to owner
|
||||
os.umask(0077)
|
||||
if self.__daemon:
|
||||
if self.__daemon: # pragma: no cover
|
||||
logSys.info("Starting in daemon mode")
|
||||
ret = self.__createDaemon()
|
||||
if ret:
|
||||
|
@ -379,7 +379,7 @@ class Server:
|
|||
try:
|
||||
handler.flush()
|
||||
handler.close()
|
||||
except (ValueError, KeyError):
|
||||
except (ValueError, KeyError): # pragma: no cover
|
||||
if sys.version_info >= (2,6):
|
||||
raise
|
||||
# is known to be thrown after logging was shutdown once
|
||||
|
@ -404,7 +404,7 @@ class Server:
|
|||
finally:
|
||||
self.__loggingLock.release()
|
||||
|
||||
def __createDaemon(self):
|
||||
def __createDaemon(self): # pragma: no cover
|
||||
""" Detach a process from the controlling terminal and run it in the
|
||||
background as a daemon.
|
||||
|
||||
|
|
Loading…
Reference in New Issue