From 35d494f49ed67768badcc81cde5e1c0f18f60cf9 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Thu, 11 Nov 2010 16:56:56 +0000 Subject: [PATCH] Fix of issue 4369, parameter msg not always a string object. svn: r16181 --- 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"),