From f3f5fa82a1b985c1292d545e6d7b9e7db29caa7f Mon Sep 17 00:00:00 2001 From: souliane Date: Fri, 18 Mar 2016 09:14:00 +0100 Subject: [PATCH] tmp/wokkel (rsm): fixes elements count (items retrieval with RSM max = 0) --- src/tmp/wokkel/rsm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tmp/wokkel/rsm.py b/src/tmp/wokkel/rsm.py index 5ece518e..d017f598 100644 --- a/src/tmp/wokkel/rsm.py +++ b/src/tmp/wokkel/rsm.py @@ -388,8 +388,9 @@ class PubSubClient(pubsub.PubSubClient): def cb(iq): items = [] pubsub_elt = iq.pubsub - for element in pubsub_elt.items.elements(pubsub.NS_PUBSUB, 'item'): - items.append(element) + if pubsub_elt.items: + for element in pubsub_elt.items.elements(pubsub.NS_PUBSUB, 'item'): + items.append(element) try: rsm_response = RSMResponse.fromElement(pubsub_elt)