summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/__init__.py')
-rw-r--r--src/lib/Bcfg2/Server/Lint/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/__init__.py b/src/lib/Bcfg2/Server/Lint/__init__.py
index 7ee18f924..e3b4c8ea7 100644
--- a/src/lib/Bcfg2/Server/Lint/__init__.py
+++ b/src/lib/Bcfg2/Server/Lint/__init__.py
@@ -90,9 +90,11 @@ class Plugin (object):
if el.text and not keep_text:
el.text = '...'
[el.remove(c) for c in el.iterchildren()]
- xml = lxml.etree.tostring(el, encoding='unicode').strip()
+ xml = lxml.etree.tostring(el,
+ xml_declaration=False).decode("UTF-8").strip()
else:
- xml = lxml.etree.tostring(element, encoding='unicode').strip()
+ xml = lxml.etree.tostring(element,
+ xml_declaration=False).decode("UTF-8").strip()
return " line %s: %s" % (element.sourceline, xml)