aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2011-02-13 10:22:33 +0000
committerVlastimil Babka <caster@gentoo.org>2011-02-13 10:22:33 +0000
commitce60188939dc534638871e4f16fb27066688ce24 (patch)
treeb0b6baf87ffb9fbc660b9227b6fd61698fe30a6e
parentAdd patch for python-2.6 from bug #239479. (diff)
downloadjavatoolkit-ce60188939dc534638871e4f16fb27066688ce24.tar.gz
javatoolkit-ce60188939dc534638871e4f16fb27066688ce24.tar.bz2
javatoolkit-ce60188939dc534638871e4f16fb27066688ce24.zip
Remove usage of PrettyPrint from pyxml, bug #354421. Thanks to Rafał Mużyło <galtgendo@o2.pl>.
svn path=/projects/javatoolkit/trunk/; revision=8311
-rw-r--r--src/py/javatoolkit/maven/MavenPom.py5
-rw-r--r--src/py/javatoolkit/xml/DomRewriter.py2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/py/javatoolkit/maven/MavenPom.py b/src/py/javatoolkit/maven/MavenPom.py
index 8a7fcd9..5de57b9 100644
--- a/src/py/javatoolkit/maven/MavenPom.py
+++ b/src/py/javatoolkit/maven/MavenPom.py
@@ -185,10 +185,7 @@ class MavenPom:
for build_node in build_nodes:
build_node.appendChild(plugins_node.cloneNode(deep=True))
- from xml.dom.ext import PrettyPrint
- self.write = self.__write
- PrettyPrint(xmldoc,self)
- self.write = None
+ self.__write(xmldoc.toxml("utf-8"))
def create_element(self,xmldoc,element_name,text_value=None):
diff --git a/src/py/javatoolkit/xml/DomRewriter.py b/src/py/javatoolkit/xml/DomRewriter.py
index 45eaf8a..b46421d 100644
--- a/src/py/javatoolkit/xml/DomRewriter.py
+++ b/src/py/javatoolkit/xml/DomRewriter.py
@@ -79,6 +79,6 @@ class DomRewriter:
def write(self,stream):
from xml.dom.ext import PrettyPrint
- PrettyPrint(self.document,stream)
+ stream.write(self.document.toxml("utf-8"))
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: