From 7fd9b694a6a50f36e9e03afe2cbb32a077f26458 Mon Sep 17 00:00:00 2001 From: souliane Date: Sun, 15 Jun 2014 16:09:30 +0200 Subject: [PATCH] frontends (quick_frontend): fixes the handling of asyncConnect failure --- frontends/src/quick_frontend/quick_app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index 614bab78..bc269496 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -157,7 +157,10 @@ class QuickApp(object): if not errback: def errback(failure): log.error(_(u"Can't connect profile [%s]") % failure) - self.launchAction(C.CHANGE_XMPP_PASSWD_ID, {}, profile_key=profile) + if failure.module.startswith('twisted.words.protocols.jabber') and failure.condition == "not-authorized": + self.launchAction(C.CHANGE_XMPP_PASSWD_ID, {}, profile_key=profile) + else: + self.showDialog(failure.message, failure.fullname, 'error') self.bridge.asyncConnect(profile, callback=callback, errback=errback) def plug_profile_4(self, watched, autoconnect, profile):