From: <bi...@us...> - 2008-06-28 21:28:29
|
Revision: 10280 http://amsn.svn.sourceforge.net/amsn/?rev=10280&view=rev Author: billiob Date: 2008-06-28 14:28:35 -0700 (Sat, 28 Jun 2008) Log Message: ----------- tiny fix to be able to connect when there's no profile Modified Paths: -------------- trunk/amsn2/amsn2/core/profile.py Modified: trunk/amsn2/amsn2/core/profile.py =================================================================== --- trunk/amsn2/amsn2/core/profile.py 2008-06-28 18:54:07 UTC (rev 10279) +++ trunk/amsn2/amsn2/core/profile.py 2008-06-28 21:28:35 UTC (rev 10280) @@ -23,7 +23,8 @@ else : self.root_element = xml.etree.ElementTree.Element("aMSNProfilesList") - self.tree = xml.etree.ElementTree.ElementTree(element = profiles_element) + self.tree = xml.etree.ElementTree.ElementTree(element = + self.root_element) def setProfileKey(self, profile_name, key, value): pass @@ -296,7 +297,9 @@ profile_file_path = os.path.join(self._profiles_dir, \ profile_name, \ "config.xml") - + if os.path.exists(profile_file_path) is False: + continue + ### Prepares XML Elements root_tree = xml.etree.ElementTree.parse(profile_file_path) settings = root_tree.find("Settings") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |