# HG changeset patch # User cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1244905722 0 # Node ID 043d71a192b545a1438a6a265e2e51205ea122c5 # Parent ea85ddce2b365af2effa66c4b67aae4f3f32e50c * _ListItem in HistoryManager will now return a string object in __str__ * Editor will now print full exception when an exception occurs when opening a file diff -r ea85ddce2b36 -r 043d71a192b5 clients/editor/plugins/HistoryManager.py --- a/clients/editor/plugins/HistoryManager.py Sat Jun 13 14:54:42 2009 +0000 +++ b/clients/editor/plugins/HistoryManager.py Sat Jun 13 15:08:42 2009 +0000 @@ -224,7 +224,7 @@ self.parent = parent def __str__(self): - return self.str + return self.str.encode("utf-8") while item is not None: listitem = _ListItem(u" "*indention + branchstr + " " + item.object.name, item, parent) diff -r ea85ddce2b36 -r 043d71a192b5 clients/editor/scripts/editor.py --- a/clients/editor/scripts/editor.py Sat Jun 13 14:54:42 2009 +0000 +++ b/clients/editor/scripts/editor.py Sat Jun 13 15:08:42 2009 +0000 @@ -16,7 +16,7 @@ from gui.error import ErrorDialog from settings import Settings from pychan.tools import callbackWithArguments as cbwa -import sys +import sys, traceback def getEditor(): """ Returns the Global editor instance """ @@ -320,8 +320,9 @@ map = loaders.loadMapFile(path, self.engine) return self.newMapView(map) except: + traceback.print_exc(sys.exc_info()[1]) errormsg = u"Opening map failed:\n" - errormsg += u"File: "+unicode(path)+"\n" + errormsg += u"File: "+unicode(path, sys.getfilesystemencoding())+u"\n" errormsg += u"Error: "+unicode(sys.exc_info()[1]) ErrorDialog(errormsg) return None