Mercurial > libervia-backend
diff src/tmp/wokkel/pubsub.py @ 1771:b77dc676a4df
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 | a125b11af711 |
children | 666ab06a9d81 |
line wrap: on
line diff
--- a/src/tmp/wokkel/pubsub.py Sun Jan 03 18:36:41 2016 +0100 +++ b/src/tmp/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