From d59c274547b6aecb3bcbfb99d1b874d403c51bea Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 22 Aug 2012 10:00:38 -0400 Subject: fixed lxml.etree.tostring invocations --- src/lib/Bcfg2/Server/Plugins/Properties.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/Bcfg2/Server/Plugins/Properties.py') diff --git a/src/lib/Bcfg2/Server/Plugins/Properties.py b/src/lib/Bcfg2/Server/Plugins/Properties.py index 3405ad50c..78019933a 100644 --- a/src/lib/Bcfg2/Server/Plugins/Properties.py +++ b/src/lib/Bcfg2/Server/Plugins/Properties.py @@ -42,9 +42,10 @@ class PropertyFile(Bcfg2.Server.Plugin.StructFile): raise Bcfg2.Server.Plugin.PluginExecutionError(msg) try: - open(self.name, "wb").write(lxml.etree.tostring(self.xdata, - encoding='unicode', - pretty_print=True)) + open(self.name, + "wb").write(lxml.etree.tostring(self.xdata, + xml_declaration=False, + pretty_print=True).decode('UTF-8')) return True except IOError: err = sys.exc_info()[1] -- cgit v1.2.3-1-g7c22