mirror of https://github.com/fail2ban/fail2ban
RF: filter.py -- single readline in a loop
parent
b3614d4ea2
commit
25674a95f8
|
@ -455,14 +455,12 @@ class FileFilter(Filter):
|
||||||
logSys.exception(e)
|
logSys.exception(e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
while True:
|
||||||
line = container.readline()
|
line = container.readline()
|
||||||
while not line == "":
|
if (line == "") or not self._isActive():
|
||||||
if not self._isActive():
|
# The jail reached the bottom or has been stopped
|
||||||
# The jail has been stopped
|
|
||||||
break
|
break
|
||||||
self.processLineAndAdd(line)
|
self.processLineAndAdd(line)
|
||||||
# Read a new line.
|
|
||||||
line = container.readline()
|
|
||||||
container.close()
|
container.close()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue