mirror of https://github.com/fail2ban/fail2ban
no cover for sporadic executed (time-related) code pieces (just to prevent randomly increasing/decreasing of coverage)
parent
fdac44ca58
commit
8ed5b44bfd
|
@ -125,7 +125,7 @@ class Fail2banClient(Fail2banCmdLine, Thread):
|
||||||
if client:
|
if client:
|
||||||
try :
|
try :
|
||||||
client.close()
|
client.close()
|
||||||
except Exception as e:
|
except Exception as e: # pragma: no cover
|
||||||
if showRet or self._conf["verbose"] > 1:
|
if showRet or self._conf["verbose"] > 1:
|
||||||
logSys.debug(e)
|
logSys.debug(e)
|
||||||
if showRet or c[0] == 'echo':
|
if showRet or c[0] == 'echo':
|
||||||
|
|
|
@ -241,7 +241,7 @@ class AsyncServer(asyncore.dispatcher):
|
||||||
def _remove_sock(self):
|
def _remove_sock(self):
|
||||||
try:
|
try:
|
||||||
os.remove(self.__sock)
|
os.remove(self.__sock)
|
||||||
except OSError as e:
|
except OSError as e: # pragma: no cover
|
||||||
if e.errno != errno.ENOENT:
|
if e.errno != errno.ENOENT:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ class Utils():
|
||||||
time.sleep(Utils.DEFAULT_SLEEP_INTERVAL)
|
time.sleep(Utils.DEFAULT_SLEEP_INTERVAL)
|
||||||
retcode = popen.poll()
|
retcode = popen.poll()
|
||||||
#logSys.debug("%s -- killed %s ", realCmd, retcode)
|
#logSys.debug("%s -- killed %s ", realCmd, retcode)
|
||||||
if retcode is None and not Utils.pid_exists(pgid):
|
if retcode is None and not Utils.pid_exists(pgid): # pragma: no cover
|
||||||
retcode = signal.SIGKILL
|
retcode = signal.SIGKILL
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
stderr = "%s -- failed with %s" % (realCmd, e)
|
stderr = "%s -- failed with %s" % (realCmd, e)
|
||||||
|
|
Loading…
Reference in New Issue