From: <jb...@us...> - 2010-05-02 10:20:32
|
Revision: 574 http://pytrainer.svn.sourceforge.net/pytrainer/?rev=574&view=rev Author: jblance Date: 2010-05-02 10:20:25 +0000 (Sun, 02 May 2010) Log Message: ----------- Changes to config file parsing to allow non-ascii chars Modified Paths: -------------- pytrainer/trunk/pytrainer/profile.py Modified: pytrainer/trunk/pytrainer/profile.py =================================================================== --- pytrainer/trunk/pytrainer/profile.py 2010-05-01 08:49:28 UTC (rev 573) +++ pytrainer/trunk/pytrainer/profile.py 2010-05-02 10:20:25 UTC (rev 574) @@ -153,7 +153,8 @@ else: logging.debug("Attempting to parse content from "+ config_file) try: - self.xml_tree = etree.ElementTree(file=config_file) + parser = etree.XMLParser(encoding='UTF8') + self.xml_tree = etree.parse(config_file, parser=parser) #TODO check here for empty file.... # Checks if configuration file is empty #if self.configuration.xmldoc is None: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |