From b9f967ea5f4043ab42edf2878bb9a19c7f1b43ef Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 10 Dec 2014 18:37:14 +0100 Subject: [PATCH] plugin XEP-0085: disabled a problematic assert (see FIXME) --- src/plugins/plugin_xep_0085.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/plugin_xep_0085.py b/src/plugins/plugin_xep_0085.py index 0d12cba4..71f5322f 100755 --- a/src/plugins/plugin_xep_0085.py +++ b/src/plugins/plugin_xep_0085.py @@ -163,7 +163,7 @@ class XEP_0085(object): if self.__isMUC(from_jid, profile): from_jid = from_jid.userhostJID() else: # update entity data for one2one chat - assert(from_jid.resource) + # assert from_jid.resource # FIXME: assert doesn't work on normal message from server (e.g. server announce), because there is no resource try: domish.generateElementsNamed(message.elements(), name="body").next() try: @@ -249,7 +249,7 @@ class XEP_0085(object): # check if notifications should be sent to this contact if self.__isMUC(to_jid, profile): return True - assert(to_jid.resource or not self.host.memory.isContactConnected(to_jid, profile)) + assert to_jid.resource or not self.host.memory.isContactConnected(to_jid, profile) try: return self.host.memory.getEntityDatum(to_jid, ENTITY_KEY, profile) except (exceptions.UnknownEntityError, KeyError):