From cf38a067e8b1a3308c2c11dbecae8efbc7be02ba Mon Sep 17 00:00:00 2001 From: Noel Power Date: Wed, 10 Oct 2018 12:21:10 +0100 Subject: [PATCH] python/samba: PY3 port samba4.blackbox.provision-backend convert ldif content to str when necessary Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- python/samba/schema.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/samba/schema.py b/python/samba/schema.py index 6f71dd8fa40..6aa0ddbe05c 100644 --- a/python/samba/schema.py +++ b/python/samba/schema.py @@ -28,6 +28,7 @@ from samba.dcerpc import security from samba.ms_schema import read_ms_schema from samba.ndr import ndr_pack from samba.samdb import SamDB +from samba.compat import get_string from samba import dsdb from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL import os @@ -112,7 +113,8 @@ class Schema(object): if files is not None: for file in files: - self.schema_data += open(file, 'rb').read() + data = get_string(open(file, 'rb').read()) + self.schema_data += data self.schema_data = substitute_var(self.schema_data, {"SCHEMADN": schemadn})