fix unicode issues

This commit is contained in:
Romain Bignon 2010-12-01 19:29:29 +01:00
commit 7be8efbab4
3 changed files with 11 additions and 9 deletions

View file

@ -23,6 +23,7 @@ from PyQt4.QtCore import SIGNAL, Qt
from weboob.capabilities.messages import ICapMessages, ICapMessagesPost, Message
from weboob.tools.application.qt import QtDo
from weboob.tools.misc import to_unicode
from .ui.messages_manager_ui import Ui_MessagesManager
@ -242,9 +243,9 @@ class MessagesManager(QWidget):
self.refreshThreadMessages(backend.name, self.thread.id)
def _postReply_eb(self, backend, error, backtrace):
content = unicode(self.tr('Unable to send message:\n%s\n')) % error
content = unicode(self.tr('Unable to send message:\n%s\n')) % to_unicode(error)
if logging.root.level == logging.DEBUG:
content += '\n%s\n' % backtrace
content += '\n%s\n' % to_unicode(backtrace)
QMessageBox.critical(self, self.tr('Error while posting reply'),
content, QMessageBox.Ok)
self.ui.backendsList.setEnabled(True)