mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-25 18:30:23 +00:00
Fix CSV output containing increasing number of null byte characters.
The CSV buffer is being truncated on each new row, but since the stream's pointer isn't also being reset, each new row starts at the same position as the previous row, but with null bytes up until that point. This leads to increasing growth in the length of each CSV row, since each line will be padded with null bytes equivalent to the previous row's length.
This commit is contained in:
parent
1c2e6c465e
commit
fb3f65cdcc
1 changed files with 1 additions and 0 deletions
|
|
@ -128,6 +128,7 @@ class CSVLogger (_Logger):
|
|||
# ... and write to the target stream
|
||||
self.write(data)
|
||||
# empty queue
|
||||
self.queue.seek(0)
|
||||
self.queue.truncate(0)
|
||||
|
||||
def end_output (self, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue