use proper utf-8 encoding for parsing xml in parameters

This commit is contained in:
Goffi 2009-12-13 18:36:20 +11:00
commit f45ae91d41

View file

@ -37,7 +37,7 @@ class Param():
### TODO: add desciption in params
#TODO: mettre Watched dans un plugin
default_xml = """
default_xml = u"""
<params>
<category name="Connection">
<param name="JabberID" value="goffi@necton2.int/TestScript" type="string" />
@ -52,7 +52,7 @@ class Param():
"""
def load_default_params(self):
self.dom = minidom.parseString(Param.default_xml)
self.dom = minidom.parseString(Param.default_xml.encode('utf-8'))
def __init__(self, host):
debug("Parameters init")
@ -78,7 +78,7 @@ class Param():
"""import xml in parameters, do nothing if the param already exist
@param parent: parent class (usefull for callbacks)
@param xml: parameters in xml form"""
src_dom = minidom.parseString(xml)
src_dom = minidom.parseString(xml.encode('utf-8'))
def import_node(tgt_parent, src_parent):
for child in src_parent.childNodes: