comparison wokkel/rsm.py @ 14:1de25b1f609f

tmp (wokkel): fixes RSM implementation to fit sat_pubsub answer when in "unrestricted" mode
author souliane <souliane@mailoo.org>
date Thu, 10 Sep 2015 07:33:13 +0200
parents 1564566e4c1f
children 9019d6cbaf0e
comparison
equal deleted inserted replaced
13:22f0cb2fa793 14:1de25b1f609f
366 _request_class = PubSubRequest 366 _request_class = PubSubRequest
367 367
368 def _toResponse_items(self, result, resource, request): 368 def _toResponse_items(self, result, resource, request):
369 response = pubsub.PubSubService._toResponse_items(self, result, 369 response = pubsub.PubSubService._toResponse_items(self, result,
370 resource, request) 370 resource, request)
371 set_elts = [elt for elt in result if elt.name == 'set'] 371 for item in result:
372 if set_elts: 372 if isinstance(item, tuple):
373 assert len(set_elts) == 1 373 # XXX: see sat_pubsub.pgsql_storage.LeafNode.getItemsById return value
374 response.addChild(set_elts[0]) 374 item = item[0]
375 if item.name == set:
376 response.addChild(item)
377 break
375 378
376 return response 379 return response