summaryrefslogtreecommitdiff
path: root/python/samba/gp_parse/gp_csv.py
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-09-05 12:46:44 +0100
committerNoel Power <npower@samba.org>2018-11-05 20:05:23 +0100
commit388bddf4a6471f17f32af209bec36713f0b75d20 (patch)
tree5b359f3550e7f294dbaec1e59cdb37d569df409d /python/samba/gp_parse/gp_csv.py
parent0934fc14ef6ed94a100caa8a622b370d41bc1182 (diff)
downloadsamba-388bddf4a6471f17f32af209bec36713f0b75d20.tar.gz
python/samba/gp_parse: PY3 file -> open
'file' no longer exists in PY3 replace with 'open' Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'python/samba/gp_parse/gp_csv.py')
-rw-r--r--python/samba/gp_parse/gp_csv.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/gp_parse/gp_csv.py b/python/samba/gp_parse/gp_csv.py
index b19f84c56f7..cd30ef2bc00 100644
--- a/python/samba/gp_parse/gp_csv.py
+++ b/python/samba/gp_parse/gp_csv.py
@@ -47,7 +47,7 @@ class GPAuditCsvParser(GPParser):
# print line
def write_xml(self, filename):
- with file(filename, 'wb') as f:
+ with open(filename, 'wb') as f:
root = Element('CsvFile')
child = SubElement(root, 'Row')
for e in self.header:
@@ -93,7 +93,7 @@ class GPAuditCsvParser(GPParser):
self.lines.append(line)
def write_binary(self, filename):
- with file(filename, 'wb') as f:
+ with open(filename, 'wb') as f:
# This should be using a unicode writer, but it seems to be in the
# right encoding at least by default.
#