diff idavoll/gateway.py @ 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 3c45208678fa
children
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: