1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-13 16:23:50 +03:00

py3: io.open takes a numeric buffering argument at index 2

It's unsure why this doesn't fail generically, but it fails on my machine sometimes...

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam
2019-02-21 15:11:39 +13:00
committed by Andrew Bartlett
parent bcb0270c6b
commit 2e231541b4

View File

@@ -96,7 +96,7 @@ class GPAuditCsvParser(GPParser):
def write_binary(self, filename):
from io import open
with open(filename, 'w', self.encoding) as f:
with open(filename, 'w', encoding=self.encoding) as f:
# In this case "binary" means "utf-8", so we let Python do that.
writer = csv.writer(f, quoting=csv.QUOTE_MINIMAL)
writer.writerow(self.header)