# HG changeset patch # User Goffi # Date 1281608862 -28800 # Node ID fbae69247b15e11013f5e9c66506f1a5189f1624 # Parent ec6611445a5be1f928386917dbcaf8fb03e74cdc Core: plugin 0100: added connection lost management for disco info diff -r ec6611445a5b -r fbae69247b15 plugins/plugin_xep_0100.py --- a/plugins/plugin_xep_0100.py Thu Aug 12 13:18:22 2010 +0800 +++ b/plugins/plugin_xep_0100.py Thu Aug 12 18:27:42 2010 +0800 @@ -23,6 +23,7 @@ from twisted.internet import protocol from twisted.words.protocols.jabber import client, jid from twisted.words.protocols.jabber import error as jab_error +import twisted.internet.error import pdb from wokkel import disco, iwokkel @@ -71,8 +72,8 @@ def discoInfoErr(self, failure, entity, request_id): """Something is going wrong with disco""" - failure.trap(jab_error.StanzaError) - error(_("Error when discovering [%(jid)s]: %(condition)s") % {'jid':entity.full(), 'condition':failure.value.condition}) + failure.trap(jab_error.StanzaError,twisted.internet.error.ConnectionLost) + error(_("Error when discovering [%(jid)s]: %(error)s") % {'jid':entity.full(), 'error':failure.getErrorMessage()}) self.__inc_handled_items(request_id)