summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2019-02-21 15:11:39 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-03-12 00:42:20 +0000
commit2e231541b48fc97ca013079585ef556efda6cb95 (patch)
treefccdf3aa09962312672cc4b7fdacc29a4f5490a8 /python
parentbcb0270c6bcd6c9268c4807030d9c5945624540e (diff)
downloadsamba-2e231541b48fc97ca013079585ef556efda6cb95.tar.gz
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>
Diffstat (limited to 'python')
-rw-r--r--python/samba/gp_parse/gp_csv.py2
1 files changed, 1 insertions, 1 deletions
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)