diff wokkel/pubsub.py @ 21:54f834e40341

tmp (wokkel/rsm): various improvments: - restored original tmp.wokkel.pubsub.PubSubService._toResponse_items - changed arguments order in RSMRequest.__init__ to have most common arguments first - added __str__ methods - better parsing/toElement - better handling of optional elements/attributes (count/index) - _toResponse_items handler RSM set elements without modifying original pubsub _toResponse_items - renamed parse to fromElement for coherency
author Goffi <goffi@goffi.org>
date Tue, 05 Jan 2016 23:20:20 +0100
parents fd6957dfa8c6
children 5246a9186b91
line wrap: on
line diff
--- a/wokkel/pubsub.py	Sun Jan 03 18:36:41 2016 +0100
+++ b/wokkel/pubsub.py	Tue Jan 05 23:20:20 2016 +0100
@@ -1408,12 +1408,8 @@
         items["node"] = request.nodeIdentifier
 
         for item in result:
-            if isinstance(item, tuple):
-                # XXX: see sat_pubsub.pgsql_storage.LeafNode.getItemsById return value
-                item = item[0]
-            if item.name == 'item':
-                item.uri = NS_PUBSUB
-                items.addChild(item)
+            item.uri = NS_PUBSUB
+            items.addChild(item)
 
         return response