Mercurial > sat_tmp
changeset 11:bcdae28d2b1f
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 | 2cd4f0ab9ad1 |
children | 1564566e4c1f |
files | wokkel/rsm.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/wokkel/rsm.py Tue Jul 14 15:22:02 2015 +0200 +++ b/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)