From 69310c0883b49cf4789213d0000e7e522ffd6d22 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Thu, 11 Nov 2010 08:29:28 +0000 Subject: [PATCH] Fix of issue 4369, parameter msg not always a string object. svn: r16174 --- src/QuestionDialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QuestionDialog.py b/src/QuestionDialog.py index 834c1d8e7..c65980132 100644 --- a/src/QuestionDialog.py +++ b/src/QuestionDialog.py @@ -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"),