diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-22 10:00:38 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-22 10:00:38 -0400 |
commit | d59c274547b6aecb3bcbfb99d1b874d403c51bea (patch) | |
tree | 7d83406c21f1825a7ec24675f2b6f86123a62da0 /src/lib/Bcfg2/Server/Plugins/Properties.py | |
parent | 2c86f67fa234406ee0007a3f77cc1aa9f45ed746 (diff) | |
download | bcfg2-d59c274547b6aecb3bcbfb99d1b874d403c51bea.tar.gz bcfg2-d59c274547b6aecb3bcbfb99d1b874d403c51bea.tar.bz2 bcfg2-d59c274547b6aecb3bcbfb99d1b874d403c51bea.zip |
fixed lxml.etree.tostring invocations
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Properties.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Properties.py | 7 |
1 files changed, 4 insertions, 3 deletions
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] |