This commit is contained in:
Jon Tibble 2010-06-19 18:56:21 +01:00
parent 685fe0311a
commit a34957297c
2 changed files with 6 additions and 3 deletions

View File

@ -339,7 +339,8 @@ class ThemeXML(object):
""" """
Pull out the XML string formatted for human consumption Pull out the XML string formatted for human consumption
""" """
return self.theme_xml.toprettyxml(indent=u' ', newl=u'\n', encoding=u'utf-8') return self.theme_xml.toprettyxml(indent=u' ', newl=u'\n',
encoding=u'utf-8')
def parse(self, xml): def parse(self, xml):
""" """
@ -364,7 +365,8 @@ class ThemeXML(object):
``xml`` ``xml``
The XML string to parse. The XML string to parse.
""" """
theme_xml = ElementTree(element=XML(xml.encode(u'ascii', u'xmlcharrefreplace'))) theme_xml = ElementTree(element=XML(xml.encode(u'ascii',
u'xmlcharrefreplace')))
xml_iter = theme_xml.getiterator() xml_iter = theme_xml.getiterator()
master = u'' master = u''
for element in xml_iter: for element in xml_iter:

View File

@ -175,7 +175,8 @@ class Theme(object):
``xml`` ``xml``
The data to apply to the theme The data to apply to the theme
""" """
root = ElementTree(element=XML(xml.encode(u'ascii', u'xmlcharrefreplace'))) root = ElementTree(element=XML(xml.encode(u'ascii',
u'xmlcharrefreplace')))
xml_iter = root.getiterator() xml_iter = root.getiterator()
for element in xml_iter: for element in xml_iter:
delphi_color_change = False delphi_color_change = False