testprogs/blackbox: PY3 bulk change for python scripts use correct python
[amitay/samba.git] / python / samba / ms_forest_updates_markdown.py
index efe1654851b0c955d96bb5331bf7fdf20c269cf9..26cc3fd776a23a7c3d26a53a22d2f9fed94d7e35 100644 (file)
@@ -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)
@@ -216,8 +217,8 @@ def read_ms_markdown(in_file, out_folder=None, out_dict={}):
     for node in tree:
         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()]
+            updates = [x[1:len(x) - 1].split('|') for x in
+                       get_string(ET.tostring(node, method='text')).splitlines()]
             for update in updates[2:]:
                 output = re.match('Operation (\d+): {(.*)}', update[0])
                 if output:
@@ -259,6 +260,7 @@ def read_ms_markdown(in_file, out_folder=None, out_dict={}):
 
             # print ET.tostring(node, method='text')
 
+
 if __name__ == '__main__':
     import sys