comparison src/tmp/wokkel/rsm.py @ 1510:91631837ce5c

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 4fb3280c4568
children bad2e0e3fe70
comparison
equal deleted inserted replaced
1509:72e6ee3fdf53 1510:91631837ce5c
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