This commit is contained in:
Florian Bruhin 2016-06-08 09:43:54 +02:00
parent 4b78b22b9a
commit cca26f0f13
2 changed files with 5 additions and 1 deletions

View File

@ -191,7 +191,7 @@ class AppendLineParser(BaseLineParser):
do_save = self._prepare_save()
if not do_save:
return
with self._open('w') as f:
with self._open('w'):
pass
self.new_data = []
self._after_save()
@ -254,6 +254,7 @@ class LineParser(BaseLineParser):
self.data = []
self.save()
class LimitLineParser(LineParser):
"""A LineParser with a limited count of lines.

View File

@ -57,6 +57,9 @@ class LineparserSaveStub(lineparser.BaseLineParser):
def save(self):
self.saved = self.data
def clear(self):
pass
def __iter__(self):
return iter(self.data)