We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7413a2 commit 4050e97Copy full SHA for 4050e97
pysenal/io/file.py
@@ -379,13 +379,12 @@ def append_line(self, line):
379
self._to_append()
380
if not line.endswith('\n'):
381
line += '\n'
382
+ self._file.write(line)
383
384
def append_lines(self, lines):
385
386
for line in lines:
- if not line.endswith('\n'):
387
- line += '\n'
388
- self._file.write(line)
+ self.append_line(line)
389
390
391
class JsonLineFile(TextFile):
@@ -402,7 +401,7 @@ def read(self):
402
401
def read_line(self):
403
self._to_read()
404
for line in self._file:
405
- yield line
+ yield json.loads(line)
406
407
def write(self, data):
408
super().write(data)
0 commit comments