From: Noel Power Date: Mon, 8 Oct 2018 14:21:45 +0000 (+0100) Subject: python/samba: PY3 port samba4.blackbox.functionalprep X-Git-Tag: tdb-1.3.17~1228 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=09f6b86403cdb8cee3d999dfac1455bb87a4bdac;p=samba.git python/samba: PY3 port samba4.blackbox.functionalprep Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/forest_update.py b/python/samba/forest_update.py index ba6f859a943..985e9f98e43 100644 --- a/python/samba/forest_update.py +++ b/python/samba/forest_update.py @@ -346,7 +346,7 @@ objectClass: container controls=["search_options:1:2"]) assert len(msg) == 1 - existing_sddl = msg[0][attr][0] + existing_sddl = str(msg[0][attr][0]) index = existing_sddl.rfind("S:") if index != -1: new_sddl = existing_sddl[:index] + ace + existing_sddl[index:] diff --git a/python/samba/ms_forest_updates_markdown.py b/python/samba/ms_forest_updates_markdown.py index 3afe2ecb838..26cc3fd776a 100644 --- a/python/samba/ms_forest_updates_markdown.py +++ b/python/samba/ms_forest_updates_markdown.py @@ -27,6 +27,7 @@ import re import os import markdown import xml.etree.ElementTree as ET +from samba.compat import get_string # Display specifier updates or otherwise (ignored in forest_update.py) @@ -217,7 +218,7 @@ def read_ms_markdown(in_file, out_folder=None, out_dict={}): if node.text and node.text.startswith('|Operation'): # Strip first and last | updates = [x[1:len(x) - 1].split('|') for x in - ET.tostring(node, method='text').splitlines()] + get_string(ET.tostring(node, method='text')).splitlines()] for update in updates[2:]: output = re.match('Operation (\d+): {(.*)}', update[0]) if output: