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

svn: r16174
This commit is contained in:
Peter Landgren 2010-11-11 08:29:28 +00:00
parent 1705d0e93e
commit 69310c0883

View File

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