mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
python/samba: PY3 port samba4.blackbox.provision-backend
convert ldif content to str when necessary Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
86e22c0606
commit
cf38a067e8
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user