changeset 224:55b45c7dccb4

Upon gateway subscription to the root node, don't retrieve items. The root node is always a collection node, which cannot have items by itself.
author Ralph Meijer <ralphm@ik.nu>
date Sun, 13 Feb 2011 21:26:07 +0100
parents 0eafdced5f24
children c15c2fc058ed
files idavoll/gateway.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/idavoll/gateway.py	Sat Oct 16 22:53:23 2010 +0200
+++ b/idavoll/gateway.py	Sun Feb 13 21:26:07 2011 +0100
@@ -416,6 +416,8 @@
 
         def subscribeOrItems(hasCallbacks):
             if hasCallbacks:
+                if not nodeIdentifier:
+                    return None
                 d = self.items(jid, nodeIdentifier, 1)
                 d.addCallback(callbackForLastItem)
             else: