comparison sat_pubsub/backend.py @ 290:9f612fa19eea

backend: fixed a crash when there is no RSM in request
author Goffi <goffi@goffi.org>
date Mon, 04 May 2015 18:33:01 +0200
parents 073161f6f143
children df1edebb0466
comparison
equal deleted inserted replaced
289:f08f8536cab8 290:9f612fa19eea
1080 1080
1081 1081
1082 def items(self, request): 1082 def items(self, request):
1083 ext_data = {} 1083 ext_data = {}
1084 if const.FLAG_ENABLE_RSM: 1084 if const.FLAG_ENABLE_RSM:
1085 rsm_ = rsm.RSMRequest.parse(request.element.pubsub) 1085 ext_data['rsm'] = request.rsm
1086 if not rsm_:
1087 rsm_ = rsm.RSMRequest(const.VAL_RSM_MAX_DEFAULT)
1088 ext_data['rsm'] = rsm_
1089 d = self.backend.getItems(request.nodeIdentifier, 1086 d = self.backend.getItems(request.nodeIdentifier,
1090 request.sender, 1087 request.sender,
1091 request.maxItems, 1088 request.maxItems,
1092 request.itemIdentifiers, 1089 request.itemIdentifiers,
1093 ext_data) 1090 ext_data)