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
|
# First set the mask to only allow access to owner
|
||||||
os.umask(0077)
|
os.umask(0077)
|
||||||
if self.__daemon:
|
if self.__daemon: # pragma: no cover
|
||||||
logSys.info("Starting in daemon mode")
|
logSys.info("Starting in daemon mode")
|
||||||
ret = self.__createDaemon()
|
ret = self.__createDaemon()
|
||||||
if ret:
|
if ret:
|
||||||
|
@ -379,7 +379,7 @@ class Server:
|
||||||
try:
|
try:
|
||||||
handler.flush()
|
handler.flush()
|
||||||
handler.close()
|
handler.close()
|
||||||
except (ValueError, KeyError):
|
except (ValueError, KeyError): # pragma: no cover
|
||||||
if sys.version_info >= (2,6):
|
if sys.version_info >= (2,6):
|
||||||
raise
|
raise
|
||||||
# is known to be thrown after logging was shutdown once
|
# is known to be thrown after logging was shutdown once
|
||||||
|
@ -404,7 +404,7 @@ class Server:
|
||||||
finally:
|
finally:
|
||||||
self.__loggingLock.release()
|
self.__loggingLock.release()
|
||||||
|
|
||||||
def __createDaemon(self):
|
def __createDaemon(self): # pragma: no cover
|
||||||
""" Detach a process from the controlling terminal and run it in the
|
""" Detach a process from the controlling terminal and run it in the
|
||||||
background as a daemon.
|
background as a daemon.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue