From daccb7c953a1894ad0ae1be8bfd9e36d8ac8fdb3 Mon Sep 17 00:00:00 2001 From: souliane Date: Tue, 18 Feb 2014 14:35:30 +0100 Subject: [PATCH] plugin groupblog: do not log error message when asking for the entries of a non existent node (e.g the contact hasn't posted any message yet) --- src/plugins/plugin_misc_groupblog.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/plugin_misc_groupblog.py b/src/plugins/plugin_misc_groupblog.py index d62a1aa2..53ff18f0 100755 --- a/src/plugins/plugin_misc_groupblog.py +++ b/src/plugins/plugin_misc_groupblog.py @@ -625,7 +625,9 @@ class GroupBlog(object): d.addCallback(lambda gbdata, source_jid: (source_jid, gbdata), jid_.full()) mblogs.append(d) - dlist = defer.DeferredList(mblogs) + # consume the failure "StanzaError with condition u'item-not-found'" + # when the node doesn't exist (e.g that JID hasn't posted any message) + dlist = defer.DeferredList(mblogs, consumeErrors=True) dlist.addCallback(sendResult) return dlist @@ -682,7 +684,9 @@ class GroupBlog(object): d = self.host.plugins["XEP-0060"].subscribe(client.item_access_pubsub, self.getNodeName(jid_), profile_key=profile_key) mblogs.append(d) - dlist = defer.DeferredList(mblogs) + # consume the failure "StanzaError with condition u'item-not-found'" + # when the node doesn't exist (e.g that JID hasn't posted any message) + dlist = defer.DeferredList(mblogs, consumeErrors=True) return dlist #TODO: custom exception