summaryrefslogtreecommitdiff
path: root/python/samba/schema.py
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2018-08-08 16:56:33 +0100
committerAndrew Bartlett <abartlet@samba.org>2018-09-03 03:22:20 +0200
commit596db3a5bbca2e93e22a4405d2ad60144bcaf273 (patch)
tree5556d76ca431db4c74f13364d12afd842deeca22 /python/samba/schema.py
parent9688480dab2fef7124297e676ec2ea4e1f7a47c7 (diff)
downloadsamba-596db3a5bbca2e93e22a4405d2ad60144bcaf273.tar.gz
python/samba: open files in binary mode as appropriate
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/schema.py')
-rw-r--r--python/samba/schema.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/schema.py b/python/samba/schema.py
index 59b53faf5cd..918f3f7ecc0 100644
--- a/python/samba/schema.py
+++ b/python/samba/schema.py
@@ -112,7 +112,7 @@ class Schema(object):
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})
@@ -131,7 +131,7 @@ class Schema(object):
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: