From 19d55f7c8a8353294ff8678b2fdd3a19ad638152 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 8 Jan 2016 17:24:32 +0100 Subject: [PATCH] tmp (wokkel.rsm): RSMError now inherit from StanzaError, so they are correctly handled by services --- src/tmp/wokkel/rsm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tmp/wokkel/rsm.py b/src/tmp/wokkel/rsm.py index e6cf6cd7..cc1eef1b 100644 --- a/src/tmp/wokkel/rsm.py +++ b/src/tmp/wokkel/rsm.py @@ -25,6 +25,7 @@ U{XEP-0059}. """ from twisted.words.xish import domish +from twisted.words.protocols.jabber import error import pubsub import copy @@ -33,10 +34,12 @@ import copy NS_RSM = 'http://jabber.org/protocol/rsm' -class RSMError(Exception): +class RSMError(error.StanzaError): """ RSM error. """ + def __init__(self, text=None): + error.StanzaError.__init__(self, 'bad-request', text=text) class RSMNotFoundError(Exception):