internetarchive / warcprox

WARC writing MITM HTTP/S proxy
380 stars 54 forks source link

Remove redundant file flush() in writer #56

Closed vbanos closed 6 years ago

vbanos commented 6 years ago

We use record.write_to inside the WarcWriter.write_records method and we flush() the file after writing to make sure that data are written to disk.

The record.write_to method already finishes with a flush()! https://github.com/internetarchive/warctools/blob/master/hanzo/warctools/warc.py#L127 Thus, it is redundant.