提交 6f5c39d6 编写于 作者: O Oz T 提交者: Daniel Graña

Fix for CSV export unnecessary blank lines problem on Windows (#3039)

上级 74ce1561
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册