tmp (wokkel): pubsub response do not fail when target server doesn't handle RSM
This commit is contained in:
parent
a2962a1000
commit
204c7fdc48
1 changed files with 7 additions and 4 deletions
|
|
@ -194,7 +194,7 @@ class RSMResponse():
|
|||
try:
|
||||
set_elt = element.elements(NS_RSM, 'set').next()
|
||||
except StopIteration:
|
||||
return RSMNotFoundError()
|
||||
raise RSMNotFoundError()
|
||||
|
||||
response = RSMResponse()
|
||||
for elt in list(set_elt.elements()):
|
||||
|
|
@ -331,9 +331,12 @@ class PubSubClient(pubsub.PubSubClient):
|
|||
items.append(element)
|
||||
|
||||
if request.rsm:
|
||||
response = RSMResponse.parse(iq.pubsub)
|
||||
if response is not None:
|
||||
self._rsm_responses[ext_data['id']] = response
|
||||
try:
|
||||
response = RSMResponse.parse(iq.pubsub)
|
||||
if response is not None:
|
||||
self._rsm_responses[ext_data['id']] = response
|
||||
except RSMNotFoundError: # target pubsub server doesn't support RSM
|
||||
pass
|
||||
return items
|
||||
|
||||
d = request.send(self.xmlstream)
|
||||
|
|
|
|||
Loading…
Reference in a new issue