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

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>
This commit is contained in:
Noel Power
2018-09-05 12:46:44 +01:00
committed by Noel Power
parent 0934fc14ef
commit 388bddf4a6
6 changed files with 8 additions and 8 deletions

View File

@@ -99,7 +99,7 @@ class GPPolParser(GPParser):
# print self.pol_file.__ndr_print__()
def write_xml(self, filename):
with file(filename, 'w') as f:
with open(filename, 'wb') as f:
root = Element('PolFile')
root.attrib['signature'] = self.pol_file.header.signature
root.attrib['version'] = str(self.pol_file.header.version)
@@ -142,6 +142,6 @@ class GPPolParser(GPParser):
# self.load_xml(fromstring(contents))
def write_binary(self, filename):
with file(filename, 'wb') as f:
with open(filename, 'wb') as f:
binary_data = ndr_pack(self.pol_file)
f.write(binary_data)