From 204c7fdc486efb95dce570c6ac6d76ea4c43f568 Mon Sep 17 00:00:00 2001 From: souliane Date: Tue, 14 Jul 2015 16:41:59 +0200 Subject: [PATCH] tmp (wokkel): pubsub response do not fail when target server doesn't handle RSM --- src/tmp/wokkel/rsm.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tmp/wokkel/rsm.py b/src/tmp/wokkel/rsm.py index 61d9b80d..a989b465 100644 --- a/src/tmp/wokkel/rsm.py +++ b/src/tmp/wokkel/rsm.py @@ -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)