Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
finally:
os.umask(umask_original)
finally:
os.umask(umask_original)
- with os.fdopen(fd, 'w') as f:
+ with os.fdopen(fd, 'wb') as f:
key = samba.generate_random_bytes(16)
f.write(key)
key = samba.generate_random_bytes(16)
f.write(key)
if files is not None:
for file in files:
if files is not None:
for file in files:
- self.schema_data += open(file, 'r').read()
+ self.schema_data += open(file, 'rb').read()
self.schema_data = substitute_var(self.schema_data,
{"SCHEMADN": schemadn})
self.schema_data = substitute_var(self.schema_data,
{"SCHEMADN": schemadn})
if override_prefixmap is not None:
self.prefixmap_data = override_prefixmap
else:
if override_prefixmap is not None:
self.prefixmap_data = override_prefixmap
else:
- self.prefixmap_data = open(setup_path("prefixMap.txt"), 'r').read()
+ self.prefixmap_data = open(setup_path("prefixMap.txt"), 'rb').read()
if additional_prefixmap is not None:
for map in additional_prefixmap:
if additional_prefixmap is not None:
for map in additional_prefixmap: