From d3feefbe1f8ab1f025212ff3b687f6c36cd96c78 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 27 Jul 2010 13:28:04 +0200 Subject: [PATCH] display the error message in status when the login/password is wrong --- weboob/applications/qhavesex/status.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weboob/applications/qhavesex/status.py b/weboob/applications/qhavesex/status.py index cad7118a..885a0650 100644 --- a/weboob/applications/qhavesex/status.py +++ b/weboob/applications/qhavesex/status.py @@ -56,7 +56,7 @@ class Account(QFrame): self.weboob.repeat(60, self.updateStats) def updateStats(self): - self.process = QtDo(self.weboob, self.updateStats_cb) + self.process = QtDo(self.weboob, self.updateStats_cb, self.updateStats_eb) self.process.body = u'' self.process.in_p = False self.process.do('get_status', backends=self.backend) @@ -90,6 +90,10 @@ class Account(QFrame): self.process.body += u'%s: %s' % (field.label, field.value) + def updateStats_eb(self, backend, err, backtrace): + self.body.setText(u'Unable to connect: %s' % unicode(err)) + self.title.setText(u'%s' % unicode(self.title.text())) + class AccountsStatus(QWidget): def __init__(self, weboob, parent=None): QWidget.__init__(self, parent)