Fix of issue 4369, parameter msg not always a string object.

svn: r16181
This commit is contained in:
Peter Landgren 2010-11-11 16:56:56 +00:00
parent 658284d692
commit 35d494f49e

View File

@ -187,7 +187,7 @@ class ErrorDialog(gtk.MessageDialog):
class RunDatabaseRepair(ErrorDialog):
def __init__(self, msg, parent=None):
msg = unicode(msg.decode(sys.getfilesystemencoding()))
msg = unicode(str(msg).decode(sys.getfilesystemencoding()))
ErrorDialog.__init__(
self,
_('Error detected in database'),
@ -199,7 +199,7 @@ class RunDatabaseRepair(ErrorDialog):
class DBErrorDialog(ErrorDialog):
def __init__(self, msg, parent=None):
msg = unicode(msg.decode(sys.getfilesystemencoding()))
msg = unicode(str(msg).decode(sys.getfilesystemencoding()))
ErrorDialog.__init__(
self,
_("Low level database corruption detected"),