changeset 1914:37db78010752

tmp/wokkel (rsm): fixes elements count (items retrieval with RSM max = 0)
author souliane <souliane@mailoo.org>
date Fri, 18 Mar 2016 09:14:00 +0100
parents ee1125fffba8
children fd959c8f64b6
files src/tmp/wokkel/rsm.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/tmp/wokkel/rsm.py	Fri Mar 18 08:58:22 2016 +0100
+++ b/src/tmp/wokkel/rsm.py	Fri Mar 18 09:14:00 2016 +0100
@@ -388,8 +388,9 @@
         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)