mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
RF: filter.py -- single readline in a loop
This commit is contained in:
parent
b3614d4ea2
commit
25674a95f8
1 changed files with 4 additions and 6 deletions
|
|
@ -455,14 +455,12 @@ class FileFilter(Filter):
|
|||
logSys.exception(e)
|
||||
return False
|
||||
|
||||
line = container.readline()
|
||||
while not line == "":
|
||||
if not self._isActive():
|
||||
# The jail has been stopped
|
||||
while True:
|
||||
line = container.readline()
|
||||
if (line == "") or not self._isActive():
|
||||
# The jail reached the bottom or has been stopped
|
||||
break
|
||||
self.processLineAndAdd(line)
|
||||
# Read a new line.
|
||||
line = container.readline()
|
||||
container.close()
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue