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
"""
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):
"""
@ -364,7 +365,8 @@ class ThemeXML(object):
``xml``
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()
master = u''
for element in xml_iter:

View File

@ -175,7 +175,8 @@ class Theme(object):
``xml``
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()
for element in xml_iter:
delphi_color_change = False