no cover for sporadic executed (time-related) code pieces (just to prevent randomly increasing/decreasing of coverage)

pull/1619/head
sebres 8 years ago
parent fdac44ca58
commit 8ed5b44bfd

@ -125,7 +125,7 @@ class Fail2banClient(Fail2banCmdLine, Thread):
if client:
try :
client.close()
except Exception as e:
except Exception as e: # pragma: no cover
if showRet or self._conf["verbose"] > 1:
logSys.debug(e)
if showRet or c[0] == 'echo':

@ -241,7 +241,7 @@ class AsyncServer(asyncore.dispatcher):
def _remove_sock(self):
try:
os.remove(self.__sock)
except OSError as e:
except OSError as e: # pragma: no cover
if e.errno != errno.ENOENT:
raise

@ -170,7 +170,7 @@ class Utils():
time.sleep(Utils.DEFAULT_SLEEP_INTERVAL)
retcode = popen.poll()
#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
except OSError as e:
stderr = "%s -- failed with %s" % (realCmd, e)

Loading…
Cancel
Save