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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user