Mercurial > libervia-backend
changeset 1439:ea48663b2605
tmp (wokkel): pubsub response do not fail when target server doesn't handle RSM
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 14 Jul 2015 16:41:59 +0200 |
parents | 0fb5785b4c63 |
children | 226bbe758b1a |
files | src/tmp/wokkel/rsm.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tmp/wokkel/rsm.py Tue Jul 14 15:22:02 2015 +0200 +++ b/src/tmp/wokkel/rsm.py Tue Jul 14 16:41:59 2015 +0200 @@ -194,7 +194,7 @@ 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 @@ 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)