when an error occure with the proxy, cath the exception

This commit is contained in:
Yann Leboulanger 2004-06-11 14:03:14 +00:00
parent b0b185a9ad
commit f8979c3719
1 changed files with 6 additions and 0 deletions

View File

@ -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")