mirror of https://github.com/scrapy/scrapy.git
Fix for CSV export unnecessary blank lines problem on Windows (#3039)
This commit is contained in:
parent
74ce156154
commit
6f5c39d65f
|
|
@ -214,7 +214,8 @@ class CsvItemExporter(BaseItemExporter):
|
|||
file,
|
||||
line_buffering=False,
|
||||
write_through=True,
|
||||
encoding=self.encoding
|
||||
encoding=self.encoding,
|
||||
newline='' # Windows needs this https://github.com/scrapy/scrapy/issues/3034
|
||||
) if six.PY3 else file
|
||||
self.csv_writer = csv.writer(self.stream, **kwargs)
|
||||
self._headers_not_written = True
|
||||
|
|
|
|||
Loading…
Reference in New Issue