mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +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.ms_schema import read_ms_schema
|
||||||
from samba.ndr import ndr_pack
|
from samba.ndr import ndr_pack
|
||||||
from samba.samdb import SamDB
|
from samba.samdb import SamDB
|
||||||
|
from samba.compat import get_string
|
||||||
from samba import dsdb
|
from samba import dsdb
|
||||||
from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL
|
from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL
|
||||||
import os
|
import os
|
||||||
@ -112,7 +113,8 @@ class Schema(object):
|
|||||||
|
|
||||||
if files is not None:
|
if files is not None:
|
||||||
for file in files:
|
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,
|
self.schema_data = substitute_var(self.schema_data,
|
||||||
{"SCHEMADN": schemadn})
|
{"SCHEMADN": schemadn})
|
||||||
|
Loading…
Reference in New Issue
Block a user