RF: filter.py -- single readline in a loop

pull/8/merge
Yaroslav Halchenko 2012-07-19 01:10:59 -04:00
parent b3614d4ea2
commit 25674a95f8
1 changed files with 4 additions and 6 deletions

View File

@ -455,14 +455,12 @@ class FileFilter(Filter):
logSys.exception(e) logSys.exception(e)
return False return False
line = container.readline() while True:
while not line == "": line = container.readline()
if not self._isActive(): if (line == "") or not self._isActive():
# The jail has been stopped # The jail reached the bottom or 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