From f8979c37190f32f2dc27f7f9f4216b5402fe62fb Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 11 Jun 2004 14:03:14 +0000 Subject: [PATCH] when an error occure with the proxy, cath the exception --- core/core.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/core.py b/core/core.py index a1e6c6306..65c912ce0 100644 --- a/core/core.py +++ b/core/core.py @@ -224,6 +224,12 @@ class GajimCore: self.hub.sendPlugin('WARNING', None, _("Couldn't connect to %s : %s") \ % (hostname, e)) return 0 + except common.xmlstream.error, e: + log.debug("Couldn't connect to %s %s" % (hostname, e)) + self.hub.sendPlugin('STATUS', account, 'offline') + self.hub.sendPlugin('WARNING', None, _("Couldn't connect to %s : %s") \ + % (hostname, e)) + return 0 else: log.debug("Connected to server")