From 2e231541b48fc97ca013079585ef556efda6cb95 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Thu, 21 Feb 2019 15:11:39 +1300 Subject: [PATCH] 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 Reviewed-by: Andrew Bartlett --- python/samba/gp_parse/gp_csv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samba/gp_parse/gp_csv.py b/python/samba/gp_parse/gp_csv.py index 9e188db47b5..e436c1b5bd2 100644 --- a/python/samba/gp_parse/gp_csv.py +++ b/python/samba/gp_parse/gp_csv.py @@ -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) -- 2.34.1